Skip to content

Commit 6188207

Browse files
committed
consolidating test/fixture
1 parent 689d869 commit 6188207

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

google_symptoms/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def params_w_patch(params):
103103
return params
104104

105105

106-
@pytest.fixture(scope="session")
106+
@pytest.fixture(scope="class")
107107
def run_as_module(params):
108108
if exists(f"{TEST_DIR}/receiving"):
109109
# Clean receiving directory

google_symptoms/tests/test_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ def test_output_files_exist(self, run_as_module):
6868
assert set(csv_files[smther]).issuperset(set(expected_files))
6969

7070

71-
def test_output_file_format(self):
71+
def test_output_file_format(self, run_as_module):
7272
df = pd.read_csv(
7373
join(f"{TEST_DIR}/receiving", "20200810_state_s03_smoothed_search.csv")
7474
)
7575
assert (df.columns.values == [
7676
"geo_id", "val", "se", "sample_size"]).all()
7777

78-
def test_output_files_smoothed(self):
78+
def test_output_files_smoothed(self, run_as_module):
7979
dates = [str(x) for x in range(20200804, 20200811)]
8080

8181
smoothed = pd.read_csv(

0 commit comments

Comments
 (0)