This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mini-project #6 - Blackjack | |
#codeskulptor URL http://www.codeskulptor.org/#user40_OeuznosqZM_6., http://www.codeskulptor.org/#user40_Mc8uD9d4lL_3.py | |
import simplegui | |
import random | |
# load card sprite - 936x384 - source: jfitz.com | |
CARD_SIZE = (72, 96) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def urlopen_latest_commit_side_effect(self, *args, **kwargs): | |
if len(args) > 0: | |
uri = args[0].get_full_url() | |
print uri | |
else: | |
raise Exception('Unexpected call to urlopen by mock object') | |
if uri == 'https://api.github.com/repos/summon/Content.xquery-test/git/refs/heads/release-ready-test': | |
return file("test_github_data/json_response") | |
elif uri == 'https://api.github.com/repos/summon/Content.xquery404/git/refs/heads/return-404': | |
raise HTTPError(uri, 404, 'Not Found', None, None) |