Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Hussain Jafari authored and hussain-jafari committed Feb 10, 2025
1 parent 1d1d58d commit f2d32d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/integration/release/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
# Fixtures #
############


@pytest.fixture(scope="session")
def release_output_dir(request: pytest.FixtureRequest) -> Path:
# don't create new directory if running using test_runner
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/release/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_release_tests(
"--check-max-tb=1000",
"--population",
"USA",
f"--output-dir={release_output_dir}"
f"--output-dir={release_output_dir}",
]
cmd = base_cmd + pytest_args

Expand All @@ -41,14 +41,14 @@ def test_release_tests(
log_dir = release_output_dir / "logs"
log_dir.mkdir(parents=True, exist_ok=True)
log_file = Path(log_dir) / f"pytest_{job_id}.o"

with open(log_file, "w") as file:
subprocess.run(cmd, stdout=file)


@pytest.mark.parametrize("dataset", ["acs", "cps"])
def test_slow_tests(dataset: str) -> None:
os.chdir(Path(__file__).parent) # need this to access cli options from conftest.py
cmd = ["pytest", "--runslow", "test_release.py", "--dataset", dataset]
result = subprocess.run(cmd, capture_output=True, text=True)
assert result.returncode == 0
os.chdir(Path(__file__).parent) # need this to access cli options from conftest.py
cmd = ["pytest", "--runslow", "test_release.py", "--dataset", dataset]
result = subprocess.run(cmd, capture_output=True, text=True)
assert result.returncode == 0

0 comments on commit f2d32d2

Please sign in to comment.