Skip to content

Commit

Permalink
cover config warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Jul 11, 2023
1 parent 50b8765 commit d05c383
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hpsspy/test/t/test_scan.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"d2/spectro/sim/([0-9a-zA-Z_-]+)/([0-9]{8})/.*$":"d2/spectro/sim/\\1/sim_\\1_\\2.tar",
"d2/targets/[^/]+$":"d2/targets/d2_targets_files.tar",
"d2/targets/([0-9]+)/.*$":"d2/targets/d2_targets_\\1.tar"
},
"d4":{
}
},
"redux":{
Expand Down
1 change: 1 addition & 0 deletions hpsspy/test/t/test_scan_disk_cache.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ d1/batch/a.txt,10,1552494014
d1/batch/b.txt,20,1552494094
d3/batch/a.txt,10,1552494114
d3/batch/b.txt,20,1552494194
d4/random_file.txt,500,1552484194
3 changes: 3 additions & 0 deletions hpsspy/test/test_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ def test_find_missing(test_config, tmpdir, monkeypatch, caplog, mock_call):
assert caplog.records[2].levelname == 'WARNING'
assert caplog.records[2].message == 'Directory d3 is not described in the configuration!'

assert caplog.records[3].levelname == 'WARNING'
assert caplog.records[3].message == 'Directory d4 is not configured!'

with open(missing_files) as j:
missing = json.load(j)
assert tuple(missing.keys()) == ('d1/batch.tar', )
Expand Down

0 comments on commit d05c383

Please sign in to comment.