Skip to content

Commit

Permalink
Look in hidden directory for status files
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Sep 20, 2023
1 parent d5ffd9c commit 0d9a047
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/forward_pass/test_solar_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_solar_cli(runner):

raise RuntimeError(msg)

status_files = glob.glob(os.path.join(td, 'jobstatus_*.json'))
status_files = glob.glob(os.path.join(td, '.gaps', 'jobstatus_*.json'))
assert len(status_files) == len(fps)

out_files = glob.glob(os.path.join(td, 'chunks/*_irradiance.h5'))
Expand Down
4 changes: 2 additions & 2 deletions tests/pipeline/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ def test_pipeline_fwp_qa(runner):
assert len(glob.glob(f'{td}/fwp_log*.log')) == 1
assert len(glob.glob(f'{td}/out*.h5')) == 1
assert len(glob.glob(f'{td}/qa.h5')) == 1
assert len(glob.glob(f'{td}/*_status.json')) == 1
assert len(glob.glob(f'{td}/.gaps/*_status.json')) == 1

status_fp = glob.glob(f'{td}/*_status.json')[0]
status_fp = glob.glob(f'{td}/.gaps/*_status.json')[0]
with open(status_fp, 'r') as f:
status = json.load(f)

Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_fwp_pipeline():
with ResourceX(fp_out) as f:
assert len(f.time_index) == t_enhance * n_tsteps

status_file = glob.glob(os.path.join(td, '*_status.json'))[0]
status_file = glob.glob(os.path.join(td, ".gaps", '*_status.json'))[0]
with open(status_file, 'r') as fh:
status = json.load(fh)
assert all(s in status for s in ('forward-pass', 'data-collect'))
Expand Down

0 comments on commit 0d9a047

Please sign in to comment.