Commit | Line | Data |
---|---|---|
cb700bcc FC |
1 | # from pathlib import Path |
2 | # import sys | |
3 | # if '' in sys.path: sys.path.remove('') | |
4 | # sys.path.append(str(Path(__file__).parent.parent.parent)) | |
5 | # from unittest import TestCase | |
6 | # from panda3d.core import loadPrcFileData | |
7 | # from ya2.engine.engine import Engine | |
8 | # from ya2.engine.configuration import Cfg | |
9 | # from ya2.game import GameLogic, Game | |
10 | # from ya2.gameobject import GameObject, FsmColleague, AudioColleague, \ | |
11 | # EventColleague, LogicColleague | |
0f9675ba FC |
12 | |
13 | ||
cb700bcc | 14 | # class LogicTests(TestCase): |
0f9675ba | 15 | |
cb700bcc FC |
16 | # def setUp(self): |
17 | # loadPrcFileData('', 'window-type none') | |
18 | # loadPrcFileData('', 'audio-library-name null') | |
0f9675ba | 19 | |
cb700bcc FC |
20 | # def tearDown(self): |
21 | # self.eng.destroy() | |
0f9675ba | 22 | |
cb700bcc FC |
23 | # def test_init(self): |
24 | # self.eng = Engine() | |
25 | # game_obj = GameObject() | |
26 | # logic = GameLogic(game_obj) | |
27 | # self.assertIsInstance(logic, GameLogic) | |
0f9675ba FC |
28 | |
29 | ||
cb700bcc | 30 | # class GameInstance(Game): |
0f9675ba | 31 | |
cb700bcc FC |
32 | # def __init__(self): |
33 | # conf = Cfg() | |
34 | # Game.__init__(self, conf) | |
35 | # self.fsm = FsmColleague(self) | |
36 | # self.logic = LogicColleague(self) | |
37 | # self.audio = AudioColleague(self) | |
38 | # self.event = EventColleague(self) | |
0f9675ba | 39 | |
cb700bcc FC |
40 | # def destroy(self): |
41 | # self.fsm.destroy() | |
42 | # self.logic.destroy() | |
43 | # self.audio.destroy() | |
44 | # self.event.destroy() | |
0f9675ba FC |
45 | |
46 | ||
cb700bcc | 47 | # class GameTests(TestCase): |
0f9675ba | 48 | |
cb700bcc FC |
49 | # def setUp(self): |
50 | # loadPrcFileData('', 'window-type none') | |
51 | # loadPrcFileData('', 'audio-library-name null') | |
0f9675ba | 52 | |
cb700bcc FC |
53 | # def test_init(self): |
54 | # self.game = GameInstance() | |
55 | # self.assertIsInstance(self.game, Game) | |
56 | # self.game.destroy() | |
0f9675ba | 57 | |
cb700bcc FC |
58 | # def tearDown(self): |
59 | # self.game.eng.destroy() |