1 from pathlib
import Path
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
.lib
.p3d
.gfx
import P3dNode
11 class EngineGfxTests(TestCase
):
14 loadPrcFileData('', 'window-type none')
15 loadPrcFileData('', 'audio-library-name null')
18 def tearDown(self
): self
.eng
.destroy()
20 def test_init_clean(self
):
22 self
.assertIsInstance(self
.eng
.gfx
.root
, P3dNode
)
24 self
.assertTrue(self
.eng
.gfx
.root
.is_empty
)
26 def test_frame_rate(self
):
27 self
.eng
.gfx
.set_frame_rate(60)