Skip to content

Commit

Permalink
Fix warnings in sunpy.io
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Jan 7, 2020
1 parent 21bd85d commit baedfc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sunpy/io/tests/test_filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
EIT_195_IMAGE = os.path.join(testpath, 'EIT/efz20040301.000010_s.fits')
AIA_171_IMAGE = os.path.join(testpath, 'aia_171_level1.fits')

pytestmark = pytest.mark.filterwarnings("ignore:Invalid 'BLANK' keyword in header")


# =============================================================================
# Test, read, get_header and write through the file independent layer
Expand Down
2 changes: 2 additions & 0 deletions sunpy/io/tests/test_fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
AIA_171_IMAGE = os.path.join(testpath, 'aia_171_level1.fits')
SWAP_LEVEL1_IMAGE = os.path.join(testpath, 'SWAP/resampled1_swap.fits')

pytestmark = pytest.mark.filterwarnings("ignore:Invalid 'BLANK' keyword in header")


def read_hdus():
pairs = sunpy.io.fits.read(RHESSI_IMAGE)
Expand Down
3 changes: 2 additions & 1 deletion sunpy/io/tests/test_srs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
[(os.path.join(testpath, elem['file']), elem['rows'])
for elem in filenames])
def test_number_of_rows(path, number_of_rows):
table = srs.read_srs(path)
with pytest.warns(UserWarning, match='dropping mask in Quantity column'):
table = srs.read_srs(path)
assert len(table) == number_of_rows


Expand Down

0 comments on commit baedfc9

Please sign in to comment.