From 5b9a3038eaa21e48f69484ad63ae50a861532936 Mon Sep 17 00:00:00 2001 From: Wolfgang Kastaun <wolfgang.kastaun@aei.mpg.de> Date: Fri, 20 Dec 2024 19:52:54 +0100 Subject: [PATCH] Improve docstrings in unit test modules --- tests/test_dynamic_delay_dask.py | 2 -- tests/test_dynamic_delay_dsp.py | 2 +- tests/test_fixed_shift_numpy.py | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/test_dynamic_delay_dask.py b/tests/test_dynamic_delay_dask.py index 4bc93aa..ce444d3 100644 --- a/tests/test_dynamic_delay_dask.py +++ b/tests/test_dynamic_delay_dask.py @@ -25,8 +25,6 @@ def test_dynamic_shift_linear_dask() -> None: d = (0.93456456 + 0.0235345 * np.cos(4.3354 * t)) / dt - # ~ print(y[0], t[0], d[0]) - op_da = make_dynamic_shift_linear_dask( d.min(), d.max(), ShiftBC.FLAT, ShiftBC.EXCEPTION ) diff --git a/tests/test_dynamic_delay_dsp.py b/tests/test_dynamic_delay_dsp.py index 1f97c63..ad24b06 100644 --- a/tests/test_dynamic_delay_dsp.py +++ b/tests/test_dynamic_delay_dsp.py @@ -1,4 +1,4 @@ -"""Unit tests for module dynamic_delay_dsp""" +"""Unit tests for module dynamic_delay_dsp and fixed_shift_dsp""" import numpy as np import pytest diff --git a/tests/test_fixed_shift_numpy.py b/tests/test_fixed_shift_numpy.py index 400f0f1..26277d0 100644 --- a/tests/test_fixed_shift_numpy.py +++ b/tests/test_fixed_shift_numpy.py @@ -1,3 +1,5 @@ +"""Unit tests for module fixed_shift_numpy""" + import numpy as np import pytest @@ -24,7 +26,6 @@ def test_fixed_shift_lagrange_dask() -> None: y = g(t) for d in (0.93456456 / dt, 3.1, 3.5, 3.9, 4.0, 4.1, 4.5, 4.9): - # ~ d = 0.93456456 / dt op_np = make_fixed_shift_lagrange_numpy(ShiftBC.FLAT, ShiftBC.EXCEPTION, length) @@ -37,8 +38,6 @@ def test_fixed_shift_lagrange_dask() -> None: assert s_ex[margin_ex:] == pytest.approx(s_np[margin_ex:], abs=1e-15, rel=5e-13) - # ~ assert np.min(np.abs(s_ex[:margin_ex] - s_np[:margin_ex])) > np.max(np.abs(y[:margin_ex]))*1e-10 - with pytest.raises(RuntimeError): op_np(y, d) @@ -54,7 +53,6 @@ def test_fixed_shift_lagrange_dask() -> None: assert s2_ex[:-margin2_ex] == pytest.approx( s2_np[:-margin2_ex], abs=1e-15, rel=5e-13 ) - # ~ assert np.min(np.abs(s2_ex[-margin2_ex:] - s2_np[-margin2_ex:])) > np.max(np.abs(y[-margin2_ex:]))*1e-10 with pytest.raises(RuntimeError): op2_np(y, -d) -- GitLab