board = [[<classes.monument.Monument object at 0x7f2a0e892fd0>, <classes.highway.Highway object at 0x7f2a0ed9f6a0>, <classes.p...0ed9f940>, <classes.building.Building object at 0x7f2a0ed9fe50>, <classes.building.Building object at 0x7f2a0ed9fac0>]]
testPrintBoard = [' A B C D Building Remaining', ' +-----+-----+-----+-----+ --------------------',...K | 7', ' 2| BCH | | | | SHP | 7', ' +-----+-----+-----+-----+ HWY | 7', ...]
buildingPool = {'BCH': 7, 'HWY': 7, 'MON': 7, 'PRK': 7, ...}
buildingHistory = {'1': ['PRK', 'PRK'], '2': ['HSE', 'HSE'], '3': ['FAC', 'FAC'], '4': ['MON', 'MON'], ...}
@pytest.mark.order(4)
@pytest.mark.parametrize("board, testPrintBoard, buildingPool, buildingHistory", [
(defaultBuildingsAllBoard, defaultPrintBoard, defaultBuildingPoolBoard, defaultBuildingHistory),
(nonDefaultBuildingsAllBoard, nonDefaultPrintBoard, nonDefaultBuildingPoolBoard, nonDefaultBuildingHistory)])
def test_load_game_with_all_buildings(board, testPrintBoard, buildingPool, buildingHistory):
"""
Tests the output in console of load game option in menu with existing save with all buildings on board
Test two different boards, with default building pool on 1st board, and a board with PRK and MON.
"""
savePath = './game_save.json'
if os.path.exists(savePath):
os.remove(savePath)
else:
print('no save found')
set_keyboard_input(["1", "a1", "5", "0"])
# turn number is 2, and BCH is built in a1 spot
test_game = Game(height = 4, width = 4, building_pool = buildingPool)
# test_game.building_pool = buildingPool
test_game.board = board
test_game.turn_num = 5
test_game.randomized_building_history = buildingHistory
test_game.start_new_turn()
# checkResult = get_display_output()
# assert checkResult == [""]
set_keyboard_input(["2", "0", "0"])
# calls main menu to load game.
with pytest.raises(SystemExit) as e:
main()
result = get_display_output()
expectedResult = mainMenu + ["", "Turn 6"] + testPrintBoard + gameMenu + mainMenuNoWelcome
# expected result should be main menu to game with turn 2, and board with BCH in a1 on all sizes with game menu.
> assert result == expectedResult
E AssertionError: assert ['Welcome, ma...-------', ...] == ['Welcome, ma...-------', ...]
E At index 6 diff: ' 1| HWY | SHP | MON | 7' != ' 1| MON | HWY | PRK | SHP | MON | 7'
E Full diff:
E [
E 'Welcome, mayor of Simp City!\n'
E '----------------------------\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E 'Turn 6',
E ' A B C D Building Remaining',
E ' +-----+-----+-----+-----+ --------------------',
E - ' 1| MON | HWY | PRK | SHP | MON | 7',
E + ' 1| HWY | SHP | MON | 7',
E ' +-----+-----+-----+-----+ PRK | 7',
E ' 2| BCH | | | | SHP | 7',
E ' +-----+-----+-----+-----+ HWY | 7',
E ' 3| | | | | BCH | 7',
E ' +-----+-----+-----+-----+',
E ' 4| | | | |',
E ' +-----+-----+-----+-----+',
E '1. Build a HSE',
E '2. Build a HSE',
E '3. See remaining buildings',
E '4. See current score',
E '',
E '5. Save game',
E '0. Exit to main menu',
E 'Your choice? ',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E ]
test_load_game_refactored.py:326: AssertionError
test_load_game_corrupted_save[asdf] 0.00s
corruptStr = 'asdf'
@pytest.mark.order(5)
@pytest.mark.parametrize("corruptStr", [
("asdf"), ("1234"), (""), ('{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}'),
('{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}')
])
def test_load_game_corrupted_save(corruptStr):
"""
Tests whether error message appears if save file is corrupted and user tries to load it, and tests that when user tries to load it again, there is no save found with error message.
"""
savePath = './game_save.json'
with open(savePath, "w") as save:
save.write(corruptStr)
set_keyboard_input(["2", "2", "0", "0"])
# calls main menu. if save file is corrupted, it should return to main menu without welcome message, with error message "Failed to load game!"
with pytest.raises(SystemExit) as e:
> main()
test_load_game_refactored.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
main.py:23: in main
loaded_game = load_game()
classes/menu.py:178: in load_game
save_data = json.load(save_file)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/__init__.py:293: in load
return loads(fp.read(),
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/__init__.py:357: in loads
return _default_decoder.decode(s)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f2a103865b0>, s = 'asdf', idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/decoder.py:355: JSONDecodeError
test_load_game_corrupted_save[1234] 0.00s
corruptStr = '1234'
@pytest.mark.order(5)
@pytest.mark.parametrize("corruptStr", [
("asdf"), ("1234"), (""), ('{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}'),
('{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}')
])
def test_load_game_corrupted_save(corruptStr):
"""
Tests whether error message appears if save file is corrupted and user tries to load it, and tests that when user tries to load it again, there is no save found with error message.
"""
savePath = './game_save.json'
with open(savePath, "w") as save:
save.write(corruptStr)
set_keyboard_input(["2", "2", "0", "0"])
# calls main menu. if save file is corrupted, it should return to main menu without welcome message, with error message "Failed to load game!"
with pytest.raises(SystemExit) as e:
main()
result = get_display_output()
# expected result should be main menu, no save game found error then back to main menu without welcome message.
> assert result == mainMenu + corruptedSaveError + mainMenuNoWelcome + noSaveError + mainMenuNoWelcome
E AssertionError: assert ['Welcome, ma...hoice? ', ...] == ['Welcome, ma...hoice? ', ...]
E At index 3 diff: 'Failed to load game!' != 'The current file is corrupt and will therefore be deleted.'
E Full diff:
E [
E 'Welcome, mayor of Simp City!\n'
E '----------------------------\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E - 'The current file is corrupt and will therefore be deleted.',
E + 'Failed to load game!',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E - 'No save game found!',
E + 'Failed to load game!',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E ]
test_load_game_refactored.py:360: AssertionError
test_load_game_corrupted_save[] 0.00s
corruptStr = ''
@pytest.mark.order(5)
@pytest.mark.parametrize("corruptStr", [
("asdf"), ("1234"), (""), ('{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}'),
('{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}')
])
def test_load_game_corrupted_save(corruptStr):
"""
Tests whether error message appears if save file is corrupted and user tries to load it, and tests that when user tries to load it again, there is no save found with error message.
"""
savePath = './game_save.json'
with open(savePath, "w") as save:
save.write(corruptStr)
set_keyboard_input(["2", "2", "0", "0"])
# calls main menu. if save file is corrupted, it should return to main menu without welcome message, with error message "Failed to load game!"
with pytest.raises(SystemExit) as e:
> main()
test_load_game_refactored.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
main.py:23: in main
loaded_game = load_game()
classes/menu.py:178: in load_game
save_data = json.load(save_file)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/__init__.py:293: in load
return loads(fp.read(),
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/__init__.py:357: in loads
return _default_decoder.decode(s)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f2a103865b0>, s = '', idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/json/decoder.py:355: JSONDecodeError
corruptStr = '{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}'
@pytest.mark.order(5)
@pytest.mark.parametrize("corruptStr", [
("asdf"), ("1234"), (""), ('{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}'),
('{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}')
])
def test_load_game_corrupted_save(corruptStr):
"""
Tests whether error message appears if save file is corrupted and user tries to load it, and tests that when user tries to load it again, there is no save found with error message.
"""
savePath = './game_save.json'
with open(savePath, "w") as save:
save.write(corruptStr)
set_keyboard_input(["2", "2", "0", "0"])
# calls main menu. if save file is corrupted, it should return to main menu without welcome message, with error message "Failed to load game!"
with pytest.raises(SystemExit) as e:
main()
result = get_display_output()
# expected result should be main menu, no save game found error then back to main menu without welcome message.
> assert result == mainMenu + corruptedSaveError + mainMenuNoWelcome + noSaveError + mainMenuNoWelcome
E AssertionError: assert ['Welcome, ma...hoice? ', ...] == ['Welcome, ma...hoice? ', ...]
E At index 3 diff: 'Failed to load game!' != 'The current file is corrupt and will therefore be deleted.'
E Full diff:
E [
E 'Welcome, mayor of Simp City!\n'
E '----------------------------\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E - 'The current file is corrupt and will therefore be deleted.',
E + 'Failed to load game!',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E - 'No save game found!',
E + 'Failed to load game!',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E ]
test_load_game_refactored.py:360: AssertionError
corruptStr = '{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}'
@pytest.mark.order(5)
@pytest.mark.parametrize("corruptStr", [
("asdf"), ("1234"), (""), ('{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}'),
('{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}')
])
def test_load_game_corrupted_save(corruptStr):
"""
Tests whether error message appears if save file is corrupted and user tries to load it, and tests that when user tries to load it again, there is no save found with error message.
"""
savePath = './game_save.json'
with open(savePath, "w") as save:
save.write(corruptStr)
set_keyboard_input(["2", "2", "0", "0"])
# calls main menu. if save file is corrupted, it should return to main menu without welcome message, with error message "Failed to load game!"
with pytest.raises(SystemExit) as e:
main()
result = get_display_output()
# expected result should be main menu, no save game found error then back to main menu without welcome message.
> assert result == mainMenu + corruptedSaveError + mainMenuNoWelcome + noSaveError + mainMenuNoWelcome
E AssertionError: assert ['Welcome, ma...hoice? ', ...] == ['Welcome, ma...hoice? ', ...]
E At index 3 diff: 'Failed to load game!' != 'The current file is corrupt and will therefore be deleted.'
E Full diff:
E [
E 'Welcome, mayor of Simp City!\n'
E '----------------------------\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E - 'The current file is corrupt and will therefore be deleted.',
E + 'Failed to load game!',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E '',
E - 'No save game found!',
E + 'Failed to load game!',
E '\n'
E '1. Start new game\n'
E '2. Load saved game\n'
E '3. Show high scores\n'
E '4. Choose building pool\n'
E '5. Choose city size\n'
E '\n'
E '0. Exit',
E 'Your choice? ',
E ]
test_load_game_refactored.py:360: AssertionError
test_update_high_score_list.py
test_update_high_score_corrupted_file 0.00s
@pytest.mark.order(8)
def test_update_high_score_corrupted_file():
"""
Test whether the system will display error message when existing high score file is corrupted and display the new high score list with only 1 player
"""
high_score_list_1x1_2 = [
"--------- HIGH SCORES ---------",
"Pos Player Score",
"--- ------ -----",
" 1. Never 1",
"-------------------------------"
]
gameBoard1x1_1 = [
[Factory(0,0)]
]
board1x1Filled_1 = [
" A ",
" +-----+",
" 1| FAC |",
" +-----+",
]
score_computation1x1_1 = [
"HSE: 0",
"FAC: 1 = 1",
"SHP: 0",
"HWY: 0",
"BCH: 0",
"Total score: 1"
]
congratsMsg = ["Congratulations! You made the high score board at position 1!",
"Please enter your name (max 20 chars): "]
high_score_json_1 = {
"board_size": 1,
"high" : [
{
"name": "HelloWorldHeyDevOps",
"score": 16
}
],
"hell": 'well'
}
errorMsg = ["The current high score file is corrupt and a new high score list will be generated."]
high_score_Exist = os.path.exists('high_score_1.json')
if high_score_Exist:
os.remove('high_score_1.json')
jsonString = json.dumps(high_score_json_1)
jsonFile = open("high_score_1.json", "w")
jsonFile.write(jsonString)
jsonFile.close()
set_keyboard_input(["Never", "0"])
defaultBuildingPool = {"HSE":8, "FAC":8, "SHP": 8, "HWY":8, "BCH":8}
test_game = Game(width = 1, height = 1)
test_game.building_pool = defaultBuildingPool
test_game.board = gameBoard1x1_1
test_game.turn_num = 2
> test_game.start_new_turn()
test_update_high_score_list.py:690:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
classes/game.py:167: in start_new_turn
self.update_high_score()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <classes.game.Game object at 0x7f2a0ef95610>
def update_high_score(self):
"""
Update high score with user's score
Swah Jianoon T01 27th January
"""
filename = "high_score_{0}.json".format((self.width)*(self.height))
file_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),filename)
save_data = load_json(file_path)
save_data["board_size"] = (self.width)*(self.height)
> high_score_list = save_data["high_scores"]
E KeyError: 'high_scores'
classes/game.py:409: KeyError
test_show_high_score.py
test_show_high_score_file_corrupted 0.00s
def test_show_high_score_file_corrupted():
"""
Test whether the system will display error msg and continue working when reading the corrupted saved file.
"""
chosen_city_size_7x1 = [
"--------- CHOSEN CITY SIZE ---------",
"Width: 7",
"Height: 1",
"------------------------------------"
]
high_score_json_7 = {
"board_size": 1,
"high" : [
{
"name": "HelloWorldHeyDevOps",
"score": 16
}
],
"hell": 'well'
}
errorMsg = ["The current file is corrupt and will therefore be deleted."]
high_score_Exist = os.path.exists('high_score_7.json')
if high_score_Exist:
os.remove('high_score_7.json')
jsonString = json.dumps(high_score_json_7)
jsonFile = open("high_score_7.json", "w")
jsonFile.write(jsonString)
jsonFile.close()
set_keyboard_input(["5","7","1","3","0"])
with pytest.raises(SystemExit) as e:
> test_application = main.main()
test_show_high_score.py:329:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
main.py:27: in main
Game(width=city_size[0], height=city_size[1]).display_high_score()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <classes.game.Game object at 0x7f2a0ed6efd0>
def display_high_score(self):
"""
Display high score
Swah Jianoon T01 27th January
"""
filename = "high_score_{0}.json".format((self.width)*(self.height))
file_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),filename)
save_data = load_json(file_path)
> high_score_list = save_data["high_scores"]
E KeyError: 'high_scores'
classes/game.py:444: KeyError
Test Report
Report generated on 05-Feb-2022 at 14:13:34 by pytest-md
Summary
222 tests ran in 1.88 seconds
8 failed
test_load_game_refactored.py
test_load_game_with_all_buildings[board1-testPrintBoard1-buildingPool1-buildingHistory1]
0.00stest_load_game_corrupted_save[asdf]
0.00stest_load_game_corrupted_save[1234]
0.00stest_load_game_corrupted_save[]
0.00stest_load_game_corrupted_save[{"board": {"1,1": "PRK"}, "turn_num": 2, "width": 4, "height": 4}]
0.00stest_load_game_corrupted_save[{"boardasdf": {"0,0": "SHP"}, "turn_num": 2, "width": 4, "height": 4, "randomized_history": {"1": ["SHP", "SHP"], "2": ["BCH", "HWY"]}, "building_pool": {"HSE": 8, "FAC": 8, "SHP": 7, "HWY": 8, "BCH": 8}}]
0.00stest_update_high_score_list.py
test_update_high_score_corrupted_file
0.00stest_show_high_score.py
test_show_high_score_file_corrupted
0.00s123 passed
test_load_game_refactored.py
test_load_game_no_save
0.00stest_load_game_empty_board[printEmptyBoard0-3]
0.00stest_load_game_empty_board[printEmptyBoard1-4]
0.00stest_load_game_empty_board[printEmptyBoard2-5]
0.00stest_load_game_with_save_different_board_sizes[printBoard0-3]
0.00stest_load_game_with_save_different_board_sizes[printBoard1-4]
0.00stest_load_game_with_save_different_board_sizes[printBoard2-5]
0.00stest_load_game_with_all_buildings[board0-testPrintBoard0-buildingPool0-buildingHistory0]
0.00stest_update_high_score_list.py
test_update_high_scores_diff_citysize_same_cityarea_samename
0.00stest_update_high_scores_same_score_lower_position
0.00stest_update_high_scores_invalid_name
0.00stest_update_high_scores_never_got_top_10
0.00stest_update_high_scores_only_got_10_players_in_list
0.00stest_update_high_scores_display_separately_for_diff_city_area
0.00stest_build_building_refactored.py
test_build_a_building_SHP
0.00stest_build_a_building_BCH
0.00stest_build_a_building_HWY
0.00stest_build_a_building_FAC
0.00stest_build_a_building_HSE
0.00stest_build_a_building_MON
0.00stest_build_a_building_PRK
0.00stest_build_a_building_invalid_input[invalidInput0]
0.00stest_build_a_building_invalid_input[invalidInput1]
0.00stest_build_a_building_invalid_input[invalidInput2]
0.00stest_build_a_building_invalid_location
0.00stest_build_a_building_build_on_existing_building
0.00stest_choose_building_pool_refactored.py
test_choose_building_pool
0.00stest_choose_building_pool_invalid_input[invalidInput0-expectedResult0]
0.00stest_choose_building_pool_invalid_input[invalidInput1-expectedResult1]
0.00stest_choose_building_pool_invalid_input[invalidInput2-expectedResult2]
0.00stest_choose_building_pool_out_of_range[invalidInput0-expectedResult0]
0.00stest_choose_building_pool_out_of_range[invalidInput1-expectedResult1]
0.00stest_choose_building_pool_out_of_range[invalidInput2-expectedResult2]
0.00stest_choose_building_pool_out_of_range[invalidInput3-expectedResult3]
0.00stest_choose_building_pool_out_of_range[invalidInput4-expectedResult4]
0.00stest_choose_city_size_refactored.py
test_change_city_size_main_menu
0.00stest_change_city_size_game
0.00stest_exit_change_city_size[exitInput0-expectedResult0]
0.00stest_exit_change_city_size[exitInput1-expectedResult1]
0.00stest_change_city_size_invalid_size
0.00stest_invalid_input_change_city_size[invalidInput0-expectedResult0]
0.00stest_invalid_input_change_city_size[invalidInput1-expectedResult1]
0.00stest_invalid_input_change_city_size[invalidInput2-expectedResult2]
0.00stest_invalid_input_change_city_size[invalidInput3-expectedResult3]
0.00stest_invalid_input_change_city_size[invalidInput4-expectedResult4]
0.00stest_invalid_input_change_city_size[invalidInput5-expectedResult5]
0.00stest_invalid_input_change_city_size[invalidInput6-expectedResult6]
0.00stest_game_menu_refactored.py
test_game_menu_display_board
0.00stest_game_menu_display_options
0.00stest_game_menu_display_board_options
0.00stest_game_menu_invalid_input[-1-expectedResult0]
0.00stest_game_menu_invalid_input[asdf-expectedResult1]
0.00stest_game_menu_invalid_input[13@!$
a-expectedResult2]` 0.00stest_game_menu_invalid_input[9-expectedResult3]
0.00stest_game_menu_invalid_input[-expectedResult4]
0.00stest_game_menu_return_main_menu
0.00stest_main_menu_exit.py
test_main_menu_exit
0.00stest_main_menu_refactored.py
test_main_menu_to_game_menu
0.00stest_main_menu
0.00stest_main_menu_invalid_input[-1]
0.00stest_main_menu_invalid_input[asdf]
0.00stest_main_menu_invalid_input[13@!$
a]` 0.00stest_main_menu_invalid_input[9]
0.00stest_main_menu_invalid_input[]
0.00stest_randomized_buildings.py
test_compare_randomized_building_5_turns
0.00stest_check_randomized_building_in_building_pool
0.00stest_randomized_building_options_1_building_left
0.00stest_save_game_refactored.py
test_save_game[input0-4-boardState0-boardStatePlaced0]
0.00stest_save_game[input1-5-boardState1-boardStatePlaced1]
0.00stest_save_game[input2-3-boardState2-boardStatePlaced2]
0.00stest_save_game[input3-4-boardState3-boardStatePlaced3]
0.00stest_save_game_empty_board
0.00stest_save_game_existing_save
0.00stest_see_remaining_buildings.py
test_see_remaining_building_initial_state
0.00stest_see_remaining_building_after_play
0.00stest_see_remaining_building_3x3
0.00stest_see_remaining_building_5x5
0.00stest_see_remaining_building_after_ending_game_and_starting_new
0.00stest_see_remaining_building_non_default_pool
0.00stest_show_high_score.py
test_show_high_scores_options_in_main_menu
0.00stest_show_high_scores_choice_chosen
0.00stest_show_high_scores_on_two_diff_city_area
0.00stest_show_high_scores_empty_list
0.00stest_view_current_score_refactored.py
test_view_current_score_empty
0.00stest_view_current_score_bch_center_of_city
0.00stest_view_current_score_bch_right_or_left_of_city
0.00stest_view_current_score_fac_single_fac
0.00stest_view_current_score_fac_4fac
0.00stest_view_current_score_fac_5fac
0.00stest_view_current_score_hse_single_hse
0.00stest_view_current_score_hse_2hse_adjacent
0.00stest_view_current_score_hse_2bch_center
0.00stest_view_current_score_hse_2shp_adjacent_to_hse_but_not_to_each_other
0.00stest_view_current_score_hse_1fac_adjacent
0.00stest_view_current_score_hse_1fac_adjacent_above
0.00stest_view_current_score_hse_1fac_adjacent_below
0.00stest_view_current_score_shp_single_shp
0.00stest_view_current_score_shp_single_bch_adjacent_not_in_center
0.00stest_view_current_score_shp_single_bch_adjacent_single_fac_adjacent_bch_not_in_center
0.00stest_view_current_score_shp_2_bch_adjacent_single_fac_adjacent_bch_not_in_center
0.00stest_view_current_score_hwy_single_hwy
0.00stest_view_current_score_hwy_2_hwy_adjacent_on_single_row
0.00stest_view_current_score_hwy_4_hwy_adjacent_on_single_row
0.00stest_view_currentscore_hwy_2_hwy_adjacent_on_single_row_1hwy_adjacent_on_different_row
0.00stest_view_current_score_prk[input0-2-buildingBoard0-currentScore0-actualBoard0-buildingPool0]
0.00stest_view_current_score_prk[input1-3-buildingBoard1-currentScore1-actualBoard1-buildingPool1]
0.00stest_view_current_score_prk[input2-4-buildingBoard2-currentScore2-actualBoard2-buildingPool2]
0.00stest_view_current_score_prk[input3-5-buildingBoard3-currentScore3-actualBoard3-buildingPool3]
0.00stest_view_current_score_prk[input4-6-buildingBoard4-currentScore4-actualBoard4-buildingPool4]
0.00stest_view_current_score_prk[input5-7-buildingBoard5-currentScore5-actualBoard5-buildingPool5]
0.00stest_view_current_score_prk[input6-8-buildingBoard6-currentScore6-actualBoard6-buildingPool6]
0.00stest_view_current_score_prk[input7-9-buildingBoard7-currentScore7-actualBoard7-buildingPool7]
0.00stest_view_current_score_mon[input0-2-buildingBoard0-currentScore0-actualBoard0-buildingPool0]
0.00stest_view_current_score_mon[input1-2-buildingBoard1-currentScore1-actualBoard1-buildingPool1]
0.00stest_view_current_score_mon[input2-4-buildingBoard2-currentScore2-actualBoard2-buildingPool2]
0.00stest_view_current_score_mon[input3-5-buildingBoard3-currentScore3-actualBoard3-buildingPool3]
0.00stest_view_final_score_refactored.py
test_view_final_score[input0-boardState0-1-scoreBoard0-heightWidth0-actualBoard0-boardStateFilled0]
0.00stest_view_final_score[input1-boardState1-4-scoreBoard1-heightWidth1-actualBoard1-boardStateFilled1]
0.00stest_view_final_score[input2-boardState2-9-scoreBoard2-heightWidth2-actualBoard2-boardStateFilled2]
0.00stest_view_final_score[input3-boardState3-16-scoreBoard3-heightWidth3-actualBoard3-boardStateFilled3]
0.00stest_view_final_score[input4-boardState4-25-scoreBoard4-heightWidth4-actualBoard4-boardStateFilled4]
0.00stest_view_final_score[input5-boardState5-36-scoreBoard5-heightWidth5-actualBoard5-boardStateFilled5]
0.00stest_view_final_score[input6-boardState6-16-scoreBoard6-heightWidth6-actualBoard6-boardStateFilled6]
0.00s90 skipped
test_load_game.py
test_load_game_no_save
0.00stest_load_game_empty_board
0.00stest_load_game_with_save_different_board_sizes[printBoard0-3]
0.00stest_load_game_with_save_different_board_sizes[printBoard1-4]
0.00stest_load_game_with_save_different_board_sizes[printBoard2-5]
0.00stest_build_building.py
test_build_a_building
0.00stest_build_a_building_invalid_input[invalidInput0]
0.00stest_build_a_building_invalid_input[invalidInput1]
0.00stest_build_a_building_invalid_input[invalidInput2]
0.00stest_build_a_building_invalid_location
0.00stest_build_a_building_build_on_existing_building
0.00stest_choose_building_pool.py
test_choose_building_pool
0.00stest_choose_building_pool_invalid_input[invalidInput0-expectedResult0]
0.00stest_choose_building_pool_invalid_input[invalidInput1-expectedResult1]
0.00stest_choose_building_pool_invalid_input[invalidInput2-expectedResult2]
0.00stest_choose_building_pool_out_of_range[invalidInput0-expectedResult0]
0.00stest_choose_building_pool_out_of_range[invalidInput1-expectedResult1]
0.00stest_choose_building_pool_out_of_range[invalidInput2-expectedResult2]
0.00stest_choose_building_pool_out_of_range[invalidInput3-expectedResult3]
0.00stest_choose_building_pool_out_of_range[invalidInput4-expectedResult4]
0.00stest_choose_city_size.py
test_change_city_size_main_menu
0.00stest_change_city_size_game
0.00stest_exit_change_city_size[exitInput0-expectedResult0]
0.00stest_exit_change_city_size[exitInput1-expectedResult1]
0.00stest_change_city_size_invalid_size
0.00stest_invalid_input_change_city_size[invalidInput0-expectedResult0]
0.00stest_invalid_input_change_city_size[invalidInput1-expectedResult1]
0.00stest_invalid_input_change_city_size[invalidInput2-expectedResult2]
0.00stest_invalid_input_change_city_size[invalidInput3-expectedResult3]
0.00stest_invalid_input_change_city_size[invalidInput4-expectedResult4]
0.00stest_game_menu.py
test_game_menu_display_board
0.00stest_game_menu_display_options
0.00stest_game_menu_display_board_options
0.00stest_game_menu_invalid_input[-1-expectedResult0]
0.00stest_game_menu_invalid_input[asdf-expectedResult1]
0.00stest_game_menu_invalid_input[13@!$
a-expectedResult2]` 0.00stest_game_menu_invalid_input[9-expectedResult3]
0.00stest_game_menu_invalid_input[-expectedResult4]
0.00stest_game_menu_return_main_menu
0.00stest_main_menu.py
test_main_menu_to_game_menu
0.00stest_main_menu
0.00stest_main_menu_invalid_input[-1]
0.00stest_main_menu_invalid_input[asdf]
0.00stest_main_menu_invalid_input[13@!$
a]` 0.00stest_main_menu_invalid_input[9]
0.00stest_main_menu_invalid_input[]
0.00stest_save_game.py
test_save_game[input0-4-boardState0-boardStatePlaced0]
0.00stest_save_game[input1-5-boardState1-boardStatePlaced1]
0.00stest_save_game[input2-3-boardState2-boardStatePlaced2]
0.00stest_save_game[input3-4-boardState3-boardStatePlaced3]
0.00stest_save_game_empty_board
0.00stest_save_game_existing_save
0.00stest_view_current_score.py
test_view_current_score_empty
0.00stest_view_current_score_bch_center_of_city
0.00stest_view_current_score_bch_right_or_left_of_city
0.00stest_view_current_score_fac_single_fac
0.00stest_view_current_score_fac_4fac
0.00stest_view_current_score_fac_5fac
0.00stest_view_current_score_hse_single_hse
0.00stest_view_current_score_hse_2hse_adjacent
0.00stest_view_current_score_hse_2bch_center
0.00stest_view_current_score_hse_2shp_adjacent_to_hse_but_not_to_each_other
0.00stest_view_current_score_hse_1fac_adjacent
0.00stest_view_current_score_shp_single_shp
0.00stest_view_current_score_shp_single_bch_adjacent_not_in_center
0.00stest_view_current_score_shp_single_bch_adjacent_single_fac_adjacent_bch_not_in_center
0.00stest_view_current_score_shp_2_bch_adjacent_single_fac_adjacent_bch_not_in_center
0.00stest_view_current_score_hwy_single_hwy
0.00stest_view_current_score_hwy_2_hwy_adjacent_on_single_row
0.00stest_view_current_score_hwy_4_hwy_adjacent_on_single_row
0.00stest_view_currentscore_hwy_2_hwy_adjacent_on_single_row_1hwy_adjacent_on_different_row
0.00stest_view_current_score_prk[input0-2-buildingBoard0-currentScore0-actualBoard0]
0.00stest_view_current_score_prk[input1-3-buildingBoard1-currentScore1-actualBoard1]
0.00stest_view_current_score_prk[input2-4-buildingBoard2-currentScore2-actualBoard2]
0.00stest_view_current_score_prk[input3-5-buildingBoard3-currentScore3-actualBoard3]
0.00stest_view_current_score_prk[input4-6-buildingBoard4-currentScore4-actualBoard4]
0.00stest_view_current_score_prk[input5-7-buildingBoard5-currentScore5-actualBoard5]
0.00stest_view_current_score_prk[input6-8-buildingBoard6-currentScore6-actualBoard6]
0.00stest_view_current_score_prk[input7-9-buildingBoard7-currentScore7-actualBoard7]
0.00stest_view_current_score_mon[input0-2-buildingBoard0-currentScore0-actualBoard0]
0.00stest_view_current_score_mon[input1-2-buildingBoard1-currentScore1-actualBoard1]
0.00stest_view_current_score_mon[input2-4-buildingBoard2-currentScore2-actualBoard2]
0.00stest_view_current_score_mon[input3-5-buildingBoard3-currentScore3-actualBoard3]
0.00stest_view_final_score.py
test_view_final_score[input0-boardState0-1-scoreBoard0-heightWidth0-actualBoard0-boardStateFilled0]
0.00stest_view_final_score[input1-boardState1-4-scoreBoard1-heightWidth1-actualBoard1-boardStateFilled1]
0.00stest_view_final_score[input2-boardState2-9-scoreBoard2-heightWidth2-actualBoard2-boardStateFilled2]
0.00stest_view_final_score[input3-boardState3-16-scoreBoard3-heightWidth3-actualBoard3-boardStateFilled3]
0.00stest_view_final_score[input4-boardState4-25-scoreBoard4-heightWidth4-actualBoard4-boardStateFilled4]
0.00stest_view_final_score[input5-boardState5-36-scoreBoard5-heightWidth5-actualBoard5-boardStateFilled5]
0.00stest_view_final_score[input6-boardState6-16-scoreBoard6-heightWidth6-actualBoard6-boardStateFilled6]
0.00s1 xfailed
test_update_high_score_list.py
test_update_high_scores_special_character_in_input
0.00s