Run body and fire phases during scripted control locks
This commit is contained in:
1 parent
5876da112c
commit
c285b57091
35 files changed
+1503
-45
No files matched your search
@@ -0,0 +1,25 @@
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / 'tools/binary'))
|
||||
from uncontrolled_physics import collect, eligible
|
||||
|
||||
|
||||
class UncontrolledPhysicsTests(unittest.TestCase):
|
||||
def test_source_field_and_virtual_gate_provenance(self):
|
||||
self.assertEqual(len(collect(ROOT.parent / 'Original')['tables']), 6)
|
||||
|
||||
def test_raw_control_does_not_replace_frame_and_body_flags(self):
|
||||
for control in (None, 0x1000, 0x2000):
|
||||
self.assertTrue(eligible(raw_control=control))
|
||||
for gate in ('frame_valid', 'supervisor', 'bodies_enabled', 'registered', 'body_integration'):
|
||||
self.assertFalse(eligible(raw_control=control, **{gate: False}), gate)
|
||||
self.assertFalse(eligible(raw_control=control, editor=True))
|
||||
self.assertFalse(eligible(raw_control=control, flag5099ab=True))
|
||||
self.assertTrue(eligible(raw_control=control, flag5099ab=True, override4f641c=True))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user