Skip to content

Commit b29a365

Browse files
committed
remove transitive Raises unit test to avoid coupling in the testing
1 parent c2e52c4 commit b29a365

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

tests/test_diagnostics/test_diagnostics_metrics.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -270,25 +270,3 @@ def test_compute_hypothesis_test_mismatched_shapes(summary_network, monkeypatch)
270270
bf.diagnostics.metrics.compute_mmd_hypothesis_test(
271271
observed_data, reference_data, mock_approximator, num_null_samples
272272
)
273-
274-
275-
@pytest.mark.parametrize("summary_network", [lambda data: np.random.rand(data.shape[0], 5), None])
276-
def test_compute_hypothesis_test_num_null_samples_exceeds_reference_samples(summary_network, monkeypatch):
277-
"""Test that compute_hypothesis_test raises ValueError when num_null_samples exceeds the number of reference
278-
samples."""
279-
observed_data = np.random.rand(10, 5)
280-
reference_data = np.random.rand(5, 5)
281-
num_null_samples = 10
282-
283-
mock_approximator = bf.approximators.ContinuousApproximator(
284-
adapter=None,
285-
inference_network=None,
286-
summary_network=None,
287-
)
288-
289-
monkeypatch.setattr(mock_approximator, "summary_network", summary_network)
290-
291-
with pytest.raises(ValueError):
292-
bf.diagnostics.metrics.compute_mmd_hypothesis_test(
293-
observed_data, reference_data, mock_approximator, num_null_samples
294-
)

0 commit comments

Comments
 (0)