Skip to content

Commit

Permalink
Added regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Mar 30, 2016
1 parent f86fd04 commit 3bb5fcf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions glue/core/data_factories/tests/data/events.fits

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions glue/core/data_factories/tests/test_fits.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import, division, print_function

import os
import warnings
from copy import deepcopy
from collections import namedtuple

Expand Down Expand Up @@ -189,3 +190,12 @@ def test_fits_compressed():
d = df.load_data(os.path.join(DATA, 'compressed_image.fits'),
factory=df.fits_reader)
assert d.ndim == 2


@requires_astropy
def test_fits_vector():
# Regression test for bug that caused tables with vector columns to not load
with warnings.catch_warnings(record=True) as w:
df.load_data(os.path.join(DATA, 'events.fits'), factory=df.fits_reader)
assert len(w) == 1
assert str(w[0].message) == "Dropping column 'status' since it is not 1-dimensional"

0 comments on commit 3bb5fcf

Please sign in to comment.