mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-29 13:04:59 +00:00
feat: extract reusable pathing theory generator
This commit is contained in:
parent
07c948a8b8
commit
7fbb32d8b9
7 changed files with 389 additions and 260 deletions
1
tools/tests/__init__.py
Normal file
1
tools/tests/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
"""Test package for Python tooling."""
|
||||
27
tools/tests/test_pathing_theory_matrix.py
Normal file
27
tools/tests/test_pathing_theory_matrix.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import unittest
|
||||
|
||||
from tools.pathing_theory.simulator import build_theory_cases
|
||||
|
||||
|
||||
class PathingTheoryMatrixTests(unittest.TestCase):
|
||||
def test_build_theory_cases_returns_first_wave_families(self) -> None:
|
||||
cases = build_theory_cases()
|
||||
families = {(case.family, case.subfamily) for case in cases}
|
||||
|
||||
self.assertIn(("linear", "flat"), families)
|
||||
self.assertIn(("linear", "ascend"), families)
|
||||
self.assertIn(("linear", "descend"), families)
|
||||
self.assertIn(("neo", "neo"), families)
|
||||
self.assertIn(("ceiling", "headhitter"), families)
|
||||
|
||||
linear_boundary = next(
|
||||
case
|
||||
for case in cases
|
||||
if case.case_id == "linear-flat-sprint-mm12-gap5-dy0p0"
|
||||
)
|
||||
self.assertTrue(linear_boundary.expected_reachable)
|
||||
self.assertGreater(linear_boundary.margin, 0.0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue