test: tighten wall-check to consecutive run; add warp_endpoints no-mutation test
Some checks failed
CI / Library tests (no torch) (ubuntu-latest, 3.12) (push) Has been cancelled
CI / Library tests (no torch) (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Full dev suite (with torch) (ubuntu-latest, 3.12) (push) Has been cancelled
CI / Full dev suite (with torch) (ubuntu-latest, 3.13) (push) Has been cancelled
Some checks failed
CI / Library tests (no torch) (ubuntu-latest, 3.12) (push) Has been cancelled
CI / Library tests (no torch) (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Full dev suite (with torch) (ubuntu-latest, 3.12) (push) Has been cancelled
CI / Full dev suite (with torch) (ubuntu-latest, 3.13) (push) Has been cancelled
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -199,3 +199,12 @@ def test_warp_endpoints_correction_local_to_each_end() -> None:
|
||||
f[0] = 0.08 # start residual only
|
||||
fo, _ = warp_endpoints(f, l)
|
||||
assert np.abs(fo[24:] - f[24:]).max() < 0.02
|
||||
|
||||
|
||||
def test_warp_endpoints_does_not_mutate_inputs() -> None:
|
||||
f = np.linspace(0.05, 1.10, 32)
|
||||
l = np.linspace(0.03, -0.07, 32)
|
||||
f_orig, l_orig = f.copy(), l.copy()
|
||||
warp_endpoints(f, l)
|
||||
assert np.array_equal(f, f_orig)
|
||||
assert np.array_equal(l, l_orig)
|
||||
|
||||
Reference in New Issue
Block a user