changeset 729:7d777c9a1af1 pyntnclick

Remove the last suspended-sentence-specific bits from GameLogicTestCase
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 15 Jan 2013 22:55:08 +0200
parents db0762f1de5a
children eca4d2fc11a4
files gamelib/tests/game_logic_utils.py gamelib/tests/test_scene_interactions_cryo.py gamelib/tests/test_walkthrough.py
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/tests/game_logic_utils.py	Tue Jan 15 22:52:34 2013 +0200
+++ b/gamelib/tests/game_logic_utils.py	Tue Jan 15 22:55:08 2013 +0200
@@ -2,7 +2,6 @@
 
 import pygame.display
 
-import gamelib.main
 import pyntnclick.state
 
 # Disable alpha conversion which requires a screen
@@ -12,12 +11,13 @@
 
 class GameLogicTestCase(unittest.TestCase):
     CURRENT_SCENE = None
+    GAME_DESCRIPTION_CLASS = None
 
     def setUp(self):
         # Events require us to initialize the display
         pygame.display.init()
 
-        self.game_description = gamelib.main.SuspendedSentence()
+        self.game_description = self.GAME_DESCRIPTION_CLASS()
         self.state = self.game_description.initial_state()
         self.state.current_scene = self.state.scenes[self.CURRENT_SCENE]
 
--- a/gamelib/tests/test_scene_interactions_cryo.py	Tue Jan 15 22:52:34 2013 +0200
+++ b/gamelib/tests/test_scene_interactions_cryo.py	Tue Jan 15 22:55:08 2013 +0200
@@ -1,8 +1,10 @@
+import gamelib.main
 import game_logic_utils
 
 
 class TestGameLogic(game_logic_utils.GameLogicTestCase):
 
+    GAME_DESCRIPTION_CLASS = gamelib.main.SuspendedSentence
     CURRENT_SCENE = 'cryo'
 
     def test_cryo_door_closed_hand(self):
--- a/gamelib/tests/test_walkthrough.py	Tue Jan 15 22:52:34 2013 +0200
+++ b/gamelib/tests/test_walkthrough.py	Tue Jan 15 22:55:08 2013 +0200
@@ -1,8 +1,10 @@
+import gamelib.main
 import game_logic_utils
 
 
 class TestWalkthrough(game_logic_utils.GameLogicTestCase):
 
+    GAME_DESCRIPTION_CLASS = gamelib.main.SuspendedSentence
     CURRENT_SCENE = 'cryo'
 
     def move_to(self, target):