Skip to content

Commit

Permalink
BUG: updated test_fetch_format_ssj_boundary_files_no_rm_temp
Browse files Browse the repository at this point in the history
Updated `test_fetch_format_ssj_boundary_files_no_rm_temp` to check for a zip archive instead of CDF files.
  • Loading branch information
aburrell committed Jun 20, 2024
1 parent 05ae73b commit 5c17a34
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions ocbpy/tests/test_dmsp_ssj_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,18 +444,16 @@ def test_fetch_format_ssj_boundary_files_no_rm_temp(self):
fname = sum([comp_row for comp_row in nsat.values()])

# See how many files of each temporary type were downloaded
temp_out = glob(os.path.join(self.test_dir, "dmsp-f*.cdf"))
temp_out = glob(os.path.join(self.test_dir, "fom*zip"))
test_out = glob(os.path.join(self.test_dir, "dmsp-f*.csv"))

self.assertEqual(len(temp_out), len(test_out),
msg="number of CDF and CSV files unequal")
self.assertEqual(len(temp_out), 1, msg="{:d} zip archieves".format(
len(temp_out)))
self.assertGreater(len(test_out), 0, msg="no CSV files downloaded")

# Test that the files downloaded match the requested satellites
self.assertEqual(fname, len(temp_out))
self.assertEqual(fname, len(test_out))
for fout in nsat.keys():
fname = "f{:02d}".format(fout)
self.assertEqual(sum([1 if fname in comp_row else 0
for comp_row in temp_out]), 1)
self.assertEqual(sum([1 if fname in comp_row else 0
for comp_row in test_out]), 1)

Expand Down

0 comments on commit 5c17a34

Please sign in to comment.