ya2 · news · projects · code · about

removed uml diagrams
[pmachines.git] / tests / lib / engine / test_gfx.py
CommitLineData
0f9675ba
FC
1from pathlib import Path
2import sys
3if '' in sys.path: sys.path.remove('')
4sys.path.append(str(Path(__file__).parent.parent.parent))
5from unittest import TestCase
6from panda3d.core import loadPrcFileData
53ddf3c3
FC
7from ya2.engine.engine import Engine
8from ya2.lib.p3d.gfx import P3dNode
0f9675ba
FC
9
10
11class EngineGfxTests(TestCase):
12
13 def setUp(self):
14 loadPrcFileData('', 'window-type none')
15 loadPrcFileData('', 'audio-library-name null')
16 self.eng = Engine()
17
18 def tearDown(self): self.eng.destroy()
19
20 def test_init_clean(self):
21 self.eng.gfx.init()
22 self.assertIsInstance(self.eng.gfx.root, P3dNode)
23 self.eng.gfx.clean()
24 self.assertTrue(self.eng.gfx.root.is_empty)
25
26 def test_frame_rate(self):
27 self.eng.gfx.set_frame_rate(60)