test-output.log

_coder@spark-0f87:~/Dev/pressure-wave$ uv run pytest -q
.FFF...                                                                                                                              [100%]
================================================================= FAILURES =================================================================
________________________________________________________ test_armor_only_attenuates ________________________________________________________

result = (Config(blast=BlastCfg(cube_center_m=(0.0, -4.0, 0.0), cube_extents_m=6.0, cube_segments=4, min_dist_m=1.0), rays=Rays....), (-3.0, -5.0, -1.0, np.float64(0.004720015702058304), np.float64(0.004720015702058304), np.float64(0.0), ...), ...])

    def test_armor_only_attenuates(result):
        _, rows = result
        tol = 1e-9
        for x, y, z, fa, ho, vo, na in rows:
>           assert na + tol >= ho, "no_armor should be >= helmet_only"
E           AssertionError: no_armor should be >= helmet_only
E           assert (np.float64(0.0) + 1e-09) >= np.float64(0.0025276524745583666)

tests/test_physics.py:56: AssertionError
__________________________________________________ test_two_plates_block_at_least_as_much __________________________________________________

result = (Config(blast=BlastCfg(cube_center_m=(0.0, -4.0, 0.0), cube_extents_m=6.0, cube_segments=4, min_dist_m=1.0), rays=Rays....), (-3.0, -5.0, -1.0, np.float64(0.004720015702058304), np.float64(0.004720015702058304), np.float64(0.0), ...), ...])

    def test_two_plates_block_at_least_as_much(result):
        _, rows = result
        tol = 1e-9
        for x, y, z, fa, ho, vo, na in rows:
            assert fa <= ho + tol, "full_armor should be <= helmet_only"
>           assert fa <= vo + tol, "full_armor should be <= vest_only"
E           AssertionError: full_armor should be <= vest_only
E           assert np.float64(0.0025276524745583666) <= (np.float64(0.0) + 1e-09)

tests/test_physics.py:66: AssertionError
__________________________________________________ test_no_armor_decreases_with_distance ___________________________________________________

result = (Config(blast=BlastCfg(cube_center_m=(0.0, -4.0, 0.0), cube_extents_m=6.0, cube_segments=4, min_dist_m=1.0), rays=Rays....), (-3.0, -5.0, -1.0, np.float64(0.004720015702058304), np.float64(0.004720015702058304), np.float64(0.0), ...), ...])

    def test_no_armor_decreases_with_distance(result):
        _, rows = result
        pts = [(math.dist((x, y, z), (0, 0, 0)), na) for x, y, z, fa, ho, vo, na in rows]
        pts.sort()
        nearest_na = pts[0][1]
        farthest_na = pts[-1][1]
>       assert nearest_na > farthest_na > 0, "no_armor impulse must fall with distance"
E       AssertionError: no_armor impulse must fall with distance
E       assert np.float64(0.0) > 0

tests/test_physics.py:75: AssertionError
========================================================= short test summary info ==========================================================
FAILED tests/test_physics.py::test_armor_only_attenuates - AssertionError: no_armor should be >= helmet_only
FAILED tests/test_physics.py::test_two_plates_block_at_least_as_much - AssertionError: full_armor should be <= vest_only
FAILED tests/test_physics.py::test_no_armor_decreases_with_distance - AssertionError: no_armor impulse must fall with distance
3 failed, 4 passed in 4.58s
_coder@spark-0f87:~/Dev/pressure-wave$