Mercurial > pyntnclick
comparison gamelib/tests/game_logic_utils.py @ 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 |
comparison
equal
deleted
inserted
replaced
728:db0762f1de5a | 729:7d777c9a1af1 |
---|---|
1 import unittest | 1 import unittest |
2 | 2 |
3 import pygame.display | 3 import pygame.display |
4 | 4 |
5 import gamelib.main | |
6 import pyntnclick.state | 5 import pyntnclick.state |
7 | 6 |
8 # Disable alpha conversion which requires a screen | 7 # Disable alpha conversion which requires a screen |
9 import pyntnclick.resources | 8 import pyntnclick.resources |
10 pyntnclick.resources.Resources.CONVERT_ALPHA = False | 9 pyntnclick.resources.Resources.CONVERT_ALPHA = False |
11 | 10 |
12 | 11 |
13 class GameLogicTestCase(unittest.TestCase): | 12 class GameLogicTestCase(unittest.TestCase): |
14 CURRENT_SCENE = None | 13 CURRENT_SCENE = None |
14 GAME_DESCRIPTION_CLASS = None | |
15 | 15 |
16 def setUp(self): | 16 def setUp(self): |
17 # Events require us to initialize the display | 17 # Events require us to initialize the display |
18 pygame.display.init() | 18 pygame.display.init() |
19 | 19 |
20 self.game_description = gamelib.main.SuspendedSentence() | 20 self.game_description = self.GAME_DESCRIPTION_CLASS() |
21 self.state = self.game_description.initial_state() | 21 self.state = self.game_description.initial_state() |
22 self.state.current_scene = self.state.scenes[self.CURRENT_SCENE] | 22 self.state.current_scene = self.state.scenes[self.CURRENT_SCENE] |
23 | 23 |
24 # We aren't handling events, monkey patch change_scene | 24 # We aren't handling events, monkey patch change_scene |
25 def change_scene(name): | 25 def change_scene(name): |