Fix tests
This commit is contained in:
parent
dbd5f6a1fd
commit
2e667cdebe
|
@ -7,11 +7,12 @@ class Display:
|
||||||
def __init__(self, game, screen):
|
def __init__(self, game, screen):
|
||||||
self.screen = screen
|
self.screen = screen
|
||||||
self.game = game
|
self.game = game
|
||||||
|
lines = curses.LINES if screen else 4
|
||||||
|
cols = curses.COLS * 4 // 5 if screen else 4
|
||||||
self.map_display = MapDisplay(game.m,
|
self.map_display = MapDisplay(game.m,
|
||||||
TexturePack.get_pack(
|
TexturePack.get_pack(
|
||||||
game.settings.TEXTURE_PACK),
|
game.settings.TEXTURE_PACK),
|
||||||
curses.LINES,
|
lines, cols, screen is not None)
|
||||||
curses.COLS * 4 // 5)
|
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
self.map_display.update_pad()
|
self.map_display.update_pad()
|
||||||
|
|
|
@ -10,7 +10,7 @@ class TestGame(unittest.TestCase):
|
||||||
Setup game.
|
Setup game.
|
||||||
"""
|
"""
|
||||||
self.game = Game()
|
self.game = Game()
|
||||||
self.game.new_game(False)
|
self.game.new_game(None)
|
||||||
|
|
||||||
def test_load_game(self) -> None:
|
def test_load_game(self) -> None:
|
||||||
self.assertRaises(NotImplementedError, Game.load_game, "game.save")
|
self.assertRaises(NotImplementedError, Game.load_game, "game.save")
|
||||||
|
|
Loading…
Reference in New Issue