Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
plaplant committed Jul 2, 2018
1 parent 1b73028 commit 6f8287b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pyuvdata/tests/test_uvh5.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,11 @@ def test_UVH5PartialWriteErrors():
nt.assert_raises(AssertionError, partial_uvh5.write_uvh5_part, partial_testfile, data[:, :, :, 0],
flags[:, :, :, 0], nsamples[:, :, :, 0])

# initialize a file on disk, and pass in a different object so check_header fails
empty_uvd = UVData()
nt.assert_raises(AssertionError, empty_uvd.write_uvh5_part, partial_testfile, data,
flags, nsamples, bls=key)

# clean up
os.remove(testfile)
os.remove(partial_testfile)
Expand Down
2 changes: 1 addition & 1 deletion pyuvdata/uvh5.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def _check_header(self, filename):
self.nsample_array = None
replace_nsamples = True
else:
replace_namples = False
replace_nsamples = False

if self != uvd_file:
raise AssertionError("The object metadata in memory and metadata on disk are different")
Expand Down

0 comments on commit 6f8287b

Please sign in to comment.