Skip to content

Commit

Permalink
Merge pull request #294 from sot/close-before-unlink
Browse files Browse the repository at this point in the history
in tests_acq/guide: close temp file before unlinking it
  • Loading branch information
javierggt authored Feb 27, 2024
2 parents 359a9d7 + 23a2de0 commit 52d27f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions mica/stats/tests/test_acq_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_make_acq_stats():
# Get a temporary file, but then delete it, because _save_acq_stats will only
# make a new table if the supplied file doesn't exist
fh, fn = tempfile.mkstemp(suffix='.h5')
os.close(fh)
os.unlink(fn)
acq_stats.table_file = fn
obsid = 20001
Expand Down
1 change: 1 addition & 0 deletions mica/stats/tests/test_guide_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def test_make_gui_stats():
# Get a temporary file, but then delete it, because _save_acq_stats will only
# make a new table if the supplied file doesn't exist
fh, fn = tempfile.mkstemp(suffix='.h5')
os.close(fh)
os.unlink(fn)
obsid = 20001
obsid_info, gui, star_info, catalog, temp = update_guide_stats.calc_stats(obsid)
Expand Down

0 comments on commit 52d27f9

Please sign in to comment.