Skip to content

Commit

Permalink
added a test for window size after init for orth exp
Browse files Browse the repository at this point in the history
  • Loading branch information
BalzaniEdoardo committed Dec 16, 2024
1 parent 8bff762 commit f0cb040
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,16 @@ def test_window_size_at_init(self, window_size, n_basis, expectation):
with expectation:
self.cls["conv"](n_basis, decay_rates=decay_rates, window_size=window_size)

def test_check_window_size_after_init(self):
decay_rates = np.asarray(np.arange(1, 5 + 1), dtype=float)
expectation = pytest.raises(
ValueError,
match="OrthExponentialConv basis requires at least a window_size",
)
bas = self.cls["conv"](5, decay_rates=decay_rates, window_size=10)
with expectation:
bas.window_size = 4

@pytest.mark.parametrize(
"window_size, n_basis, expectation",
[
Expand Down

0 comments on commit f0cb040

Please sign in to comment.