Skip to content

Commit

Permalink
Allow tests to pass if fitsio not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Jun 24, 2024
1 parent 84db2f5 commit 519eb41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_gg.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_direct():
with assert_raises(OSError):
treecorr.NNCorrelation.from_file(ascii_name)
# And gives error if not a valid treecorr output file.
with assert_raises(OSError):
with assert_raises((OSError, ImportError)):
treecorr.Corr2.from_file(config['file_name'])
with assert_raises(OSError):
treecorr.GGCorrelation.from_file(config['file_name'])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ggg.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def test_direct_logruv():
with assert_raises(OSError):
treecorr.KKKCorrelation.from_file(ascii_name)
# And gives error if not a valid treecorr output file.
with assert_raises(OSError):
with assert_raises((OSError, ImportError)):
treecorr.Corr3.from_file(config['file_name'])
with assert_raises(OSError):
treecorr.GGGCorrelation.from_file(config['file_name'])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_kkk.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def test_direct_logruv():
with assert_raises(OSError):
treecorr.GGGCorrelation.from_file(ascii_name)
# And gives error if not a valid treecorr output file.
with assert_raises(OSError):
with assert_raises((OSError, ImportError)):
treecorr.KKKCorrelation.from_file(config['file_name'])
with assert_raises(OSError):
treecorr.KKKCorrelation.from_file('invalid_file')
Expand Down

0 comments on commit 519eb41

Please sign in to comment.