diff --git a/tests/data/test_base.py b/tests/data/test_base.py index 6806d64..25b50fa 100644 --- a/tests/data/test_base.py +++ b/tests/data/test_base.py @@ -9,7 +9,7 @@ class TestCustomGenerator: def n(self, request): return request.param - @pytest.fixture() + @pytest.fixture def function(self, n): if n == 0: @@ -28,7 +28,7 @@ def func(a, b): return func - @pytest.fixture() + @pytest.fixture def generator(self, function): return du.data.base.CustomGenerator(function) diff --git a/tests/data/test_map.py b/tests/data/test_map.py index 24d85e4..cd10678 100644 --- a/tests/data/test_map.py +++ b/tests/data/test_map.py @@ -14,14 +14,14 @@ class BaseMapTest: cls = None - @pytest.fixture() + @pytest.fixture def generator(self): return du.data.freud.FreudDescriptor( freud.order.Steinhardt(l=SPH_HARM_NUMBER), {"particle_order": [str(sph_harm) for sph_harm in SPH_HARM_NUMBER]}, ) - @pytest.fixture() + @pytest.fixture def valid_spec(self): # noqa: PT004 """Return a valid spec.""" raise NotImplementedError @@ -92,7 +92,7 @@ def validate_output(output, compute_arr, passed_args): class TestIdentity(BaseMapTest): cls = du.data.map.Identity - @pytest.fixture() + @pytest.fixture def valid_spec(self): return lambda: {} @@ -105,7 +105,7 @@ def validate_output(output, compute_arr, passed_args): class TestSpatialAveraging(BaseMapTest): cls = du.data.spatial.NeighborAveraging - @pytest.fixture() + @pytest.fixture def valid_spec(self): return lambda: {"expected_kwarg": "neighbors", "remove_kwarg": False} @@ -131,7 +131,7 @@ def validate_output(output, compute_arr, passed_args): class TestTee(BaseMapTest): cls = du.data.map.Tee - @pytest.fixture() + @pytest.fixture def valid_spec(self): def spec(): return { @@ -160,7 +160,7 @@ def validate_output(output, compute_arr, passed_args): class TestCustomMap(BaseMapTest): cls = du.data.base.CustomMap - @pytest.fixture() + @pytest.fixture def valid_spec(self): def double(arr): return {"doubled": arr * 2} diff --git a/tests/data/test_reduce.py b/tests/data/test_reduce.py index 143a4bc..dd28f43 100644 --- a/tests/data/test_reduce.py +++ b/tests/data/test_reduce.py @@ -35,11 +35,11 @@ def _pairwise(a): def add_reducer_tests(cls, validator): class TestReducer: - @pytest.fixture() + @pytest.fixture def constructor_args(self): return validator.constructor_args - @pytest.fixture() + @pytest.fixture def base_generator(self): @du.data.make_generator def generator(): diff --git a/tests/preprocessing/test_filter.py b/tests/preprocessing/test_filter.py index d3eca0c..bd61605 100644 --- a/tests/preprocessing/test_filter.py +++ b/tests/preprocessing/test_filter.py @@ -14,7 +14,7 @@ class TestMeanShift: def get_shift_range(self, min_, max_): return (min_ * self.min_mean_shift, max_ * self.min_mean_shift) - @pytest.fixture() + @pytest.fixture def mean_shift(self): return du.preprocessing.filter.MeanShift(self.sensitivity) @@ -155,7 +155,7 @@ def check_equivalent_labels(self, a, b): for i, j in map_.items(): assert not np.any((a == i) != (b == j)) - @pytest.fixture() + @pytest.fixture def correlated(self): return du.preprocessing.filter.Correlated(max_clusters=5) diff --git a/tests/preprocessing/test_supervised.py b/tests/preprocessing/test_supervised.py index 360895f..45217eb 100644 --- a/tests/preprocessing/test_supervised.py +++ b/tests/preprocessing/test_supervised.py @@ -82,7 +82,7 @@ def signal_with_mean_shift(seeds): return rpt.pw_constant(100, 2, 1, 0.5, delta=(3, 5), seed=seeds()) -@pytest.fixture() +@pytest.fixture def window(): classifier = sk.tree.DecisionTreeClassifier(max_depth=1) return du.preprocessing.supervised.Window( @@ -97,7 +97,7 @@ def test_compute(window, signal_with_mean_shift): assert abs(error.argmin() - change_point[0]) <= max_allowed_error -@pytest.fixture() +@pytest.fixture def random_signal(rng): return rng.uniform(-500_000, 500_000, size=20).reshape((-1, 1))