Skip to content

Commit 2cc72b1

Browse files
Hussain Jafarihussain-jafari
authored andcommitted
testing
1 parent 35a9187 commit 2cc72b1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/integration/release/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
100100
############
101101
# Fixtures #
102102
############
103-
@pytest.fixture(scope="module")
103+
@pytest.fixture(scope="session")
104104
def release_output_dir(request: pytest.FixtureRequest) -> Path:
105105
output_dir_name = request.config.getoption("--output-dir", default=CLI_DEFAULT_OUTPUT_DIR)
106106
output_dir = Path(output_dir_name) / f"{time.strftime('%Y%m%d_%H%M%S')}"
@@ -158,6 +158,7 @@ def noised_data(
158158
if dataset_func != generate_social_security:
159159
kwargs["state"] = state
160160
profiling_dir = release_output_dir / "profiling"
161+
profiling_dir.mkdir(parents=True, exist_ok=True)
161162
noised_data = profile_data_generation(profiling_dir)(dataset_func)(**kwargs)
162163
if engine == "dask":
163164
# mypy expects noised_data to be a series rather than dask object

tests/integration/release/test_runner.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,23 @@
88
@pytest.mark.parametrize(
99
"pytest_args",
1010
[
11-
([]),
11+
#([]),
1212
(["--dataset", "acs"]),
13-
(["--dataset", "cps"]),
13+
#(["--dataset", "cps"]),
1414
# (["--dataset", "acs", "--population", "USA"]),
1515
# (["--dataset", "acs", "--population", "USA", "--state", "RI"]),
16-
(["--dataset", "wic", "--year", "2015"]),
16+
#(["--dataset", "wic", "--year", "2015"]),
1717
# (["--dataset", "wic", "--population", "USA", "--state", "RI", "--year", "2015"]),
1818
],
19-
ids=["1", "2", "3", "4"],
19+
#ids=["1", "2", "3", "4"],
20+
ids = ['1'],
2021
)
2122
def test_release_tests(
2223
pytest_args: list[str], release_output_dir: Path, request: pytest.FixtureRequest
2324
) -> None:
2425
os.chdir(Path(__file__).parent) # need this to access cli options from conftest.py
25-
base_cmd = ["pytest", "--release", "test_release.py"]
26-
cmd = base_cmd + pytest_args
26+
base_cmd = ["pytest", "--release", "test_release.py", f"--output-dir={release_output_dir}"]
27+
cmd = base_cmd + pytest_args + ["--population", "USA"]
2728

2829
# log using job id
2930
job_id = request.node.callspec.id

0 commit comments

Comments
 (0)