Skip to content

Commit 37e8de7

Browse files
committed
set fixture scope to module
1 parent 78be544 commit 37e8de7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

causalpy/tests/test_integration_pymc_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def test_inverse_prop():
727727
result.get_plot_data()
728728

729729

730-
@pytest.fixture
730+
@pytest.fixture(scope="module")
731731
def multi_unit_sc_data(rng):
732732
"""Generate synthetic data for SyntheticControl with multiple treated units."""
733733
n_obs = 60
@@ -773,7 +773,7 @@ def multi_unit_sc_data(rng):
773773
return df, treatment_time, control_units, treated_units
774774

775775

776-
@pytest.fixture
776+
@pytest.fixture(scope="module")
777777
def single_unit_sc_data(rng):
778778
"""Generate synthetic data for SyntheticControl with single treated unit."""
779779
n_obs = 60

causalpy/tests/test_pymc_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_result_reproducibility(seed):
172172
)
173173

174174

175-
@pytest.fixture
175+
@pytest.fixture(scope="module")
176176
def synthetic_control_data(rng):
177177
"""Generate synthetic data with multiple treated and control units."""
178178
n_obs = 50 # Smaller for faster tests
@@ -227,7 +227,7 @@ def synthetic_control_data(rng):
227227
return X, y, coords, control_units, treated_units
228228

229229

230-
@pytest.fixture
230+
@pytest.fixture(scope="module")
231231
def single_treated_data(rng):
232232
"""Generate synthetic data with single treated unit for backward compatibility testing."""
233233
n_obs = 50

0 commit comments

Comments
 (0)