Skip to content

Commit 7ad85dd

Browse files
committed
Remove super class StationarityProperty
1 parent 7b42859 commit 7ad85dd

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

tests/unit/aggregation/_property_testers.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,21 @@ def _assert_linear_under_scaling_property(
110110
assert_close(x, expected, atol=8e-03, rtol=0)
111111

112112

113-
class StationarityProperty:
113+
class StrongStationarityProperty:
114114
"""
115-
This class tests empirically that a given `Aggregator` satisfies the stationarity property.
115+
This class tests empirically that a given `Aggregator` satisfies the strong stationarity property.
116116
"""
117117

118+
@classmethod
119+
@mark.parametrize("stationary_matrix", strong_stationary_matrices)
120+
def test_stationarity_property(cls, aggregator: Aggregator, stationary_matrix: Tensor):
121+
cls._assert_stationarity_property(aggregator, stationary_matrix)
122+
123+
@classmethod
124+
@mark.parametrize("non_stationary_matrix", weak_stationary_matrices + matrices)
125+
def test_non_stationarity_property(cls, aggregator: Aggregator, non_stationary_matrix: Tensor):
126+
cls._assert_non_stationarity_property(aggregator, non_stationary_matrix)
127+
118128
@staticmethod
119129
def _assert_stationarity_property(aggregator: Aggregator, stationary_matrix: Tensor) -> None:
120130
vector = aggregator(stationary_matrix)
@@ -128,15 +138,3 @@ def _assert_non_stationarity_property(
128138
vector = aggregator(non_stationary_matrix)
129139
norm = vector.norm().item()
130140
assert norm > 1e-03
131-
132-
133-
class StrongStationarityProperty(StationarityProperty):
134-
@classmethod
135-
@mark.parametrize("stationary_matrix", strong_stationary_matrices)
136-
def test_stationarity_property(cls, aggregator: Aggregator, stationary_matrix: Tensor):
137-
cls._assert_stationarity_property(aggregator, stationary_matrix)
138-
139-
@classmethod
140-
@mark.parametrize("non_stationary_matrix", weak_stationary_matrices + matrices)
141-
def test_non_stationarity_property(cls, aggregator: Aggregator, non_stationary_matrix: Tensor):
142-
cls._assert_non_stationarity_property(aggregator, non_stationary_matrix)

0 commit comments

Comments
 (0)