Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Jul 17, 2018
1 parent df91280 commit 9219d64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyuvdata/tests/test_uvfits.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def test_readMSWriteUVFits_CASAHistory():
ms_uv = UVData()
uvfits_uv = UVData()
ms_file = os.path.join(DATA_PATH, 'day2_TDEM0003_10s_norx_1src_1spw.ms')
testfile = os.path.join(DATA_PATH, 'test/outtest_uvfits')
testfile = os.path.join(DATA_PATH, 'test/outtest.uvfits')
ms_uv.read_ms(ms_file)
ms_uv.write_uvfits(testfile, spoof_nonessential=True)
uvtest.checkWarnings(uvfits_uv.read, [testfile],
Expand Down
2 changes: 1 addition & 1 deletion pyuvdata/tests/test_uvh5.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_ReadUVH5Errors():
"""
uv_in = UVData()
fake_file = os.path.join(DATA_PATH, 'fake_file.hdf5')
nt.assert_raises(IOError, uv_in.read, fake_file)
nt.assert_raises(IOError, uv_in.read, fake_file, file_type='uvh5')
nt.assert_raises(ValueError, uv_in.read, ['list of', 'fake files'], read_data=False)

return
Expand Down
2 changes: 1 addition & 1 deletion pyuvdata/uvdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ def read(self, filename, file_type=None, antenna_nums=None, antenna_names=None,
file_type = 'uvh5'

if file_type is None:
raise(ValueError, 'File type could not be determined.')
raise ValueError('File type could not be determined.')

if file_type == 'uvfits':
if (time_range is not None):
Expand Down

0 comments on commit 9219d64

Please sign in to comment.