Skip to content

Commit f3768f3

Browse files
lint
1 parent c5f96a1 commit f3768f3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/integration/release/conftest.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
}
4646

4747
SEED = 0
48+
CLI_DEFAULT_OUTPUT_DIR = (
49+
"/mnt/team/simulation_science/priv/engineering/pseudopeople_release_testing"
50+
)
4851
CLI_DEFAULT_DATASET = "acs"
4952
CLI_DEFAULT_POP = "sample"
5053
CLI_DEFAULT_YEAR = 2020
@@ -56,6 +59,12 @@
5659

5760

5861
def pytest_addoption(parser: pytest.Parser) -> None:
62+
parser.addoption(
63+
"--output-dir",
64+
action="store",
65+
default=CLI_DEFAULT_OUTPUT_DIR,
66+
help="The output directory to write to. Defaults to /mnt/team/simulation_science/priv/engineering/pseudopeople_release_testing.",
67+
)
5968
parser.addoption(
6069
"--dataset",
6170
action="store",
@@ -92,10 +101,8 @@ def pytest_addoption(parser: pytest.Parser) -> None:
92101
# Fixtures #
93102
############
94103
@pytest.fixture(scope="module")
95-
def release_output_dir() -> Path:
96-
output_dir_name = (
97-
"/mnt/team/simulation_science/priv/engineering/pseudopeople_release_testing/"
98-
)
104+
def release_output_dir(request: pytest.FixtureRequest) -> Path:
105+
output_dir_name = request.config.getoption("--output-dir", default=CLI_DEFAULT_OUTPUT_DIR)
99106
output_dir = Path(output_dir_name) / f"{time.strftime('%Y%m%d_%H%M%S')}"
100107
output_dir.mkdir(parents=True, exist_ok=False)
101108
return output_dir.resolve()

0 commit comments

Comments
 (0)