Skip to content

Commit 20078e2

Browse files
author
Hussain Jafari
committed
working repo with residual testing code
1 parent 3a3cc82 commit 20078e2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tests/integration/release/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def noised_data(
149149
if dataset_func != generate_social_security:
150150
kwargs["state"] = state
151151
timestamped_dir = request.config.getoption("--output-dir")
152-
profiling_dir = timestamped_dir / "profiling"
152+
profiling_dir = Path(timestamped_dir) / "profiling"
153153
profiling_dir.mkdir(parents=True, exist_ok=True)
154154
noised_data = profile_data_generation(profiling_dir)(dataset_func)(**kwargs)
155155
if engine == "dask":
@@ -214,7 +214,9 @@ def wrapper(*args: Any, **kwargs: Any) -> pd.DataFrame:
214214
index=[0],
215215
)
216216
filename = f"{func.__name__}_resources.csv"
217-
output_path = os.path.join(output_dir, filename)
217+
output_path = output_dir / filename
218+
with open('/ihme/homes/hjafari/ppl_profiling_dir.txt', 'w') as f:
219+
f.write(str(output_path))
218220
resources.to_csv(output_path, index=False)
219221
return df
220222

tests/integration/release/test_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ def test_release_tests(
2929
timestamped_dir.mkdir(parents=True, exist_ok=False)
3030

3131
os.chdir(Path(__file__).parent) # need this to access cli options from conftest.py
32-
base_cmd = ["pytest", "--release", "test_release.py", "--check-max-tb=1000", f"--output-dir=={timestamped_dir}"]
33-
cmd = base_cmd + pytest_args + ["--population", "USA"]
32+
base_cmd = ["pytest", "--release", "test_release.py", "--check-max-tb=1000", f"--output-dir={timestamped_dir}"]
33+
cmd = base_cmd + pytest_args + ["--population", "USA", "-k", "unnoised"]
3434

3535
# log using job id
3636
job_id = request.node.callspec.id
3737
log_dir = timestamped_dir.resolve() / "logs"
3838
log_dir.mkdir(parents=True, exist_ok=True)
3939
log_file = log_dir / f"pytest_{job_id}.o"
40+
breakpoint()
4041
with open(log_file, "w") as file:
4142
subprocess.run(cmd, stdout=file)
4243

0 commit comments

Comments
 (0)