Skip to content

Commit 55a8d4c

Browse files
taldcroftastromancer
authored andcommitted
Remove regression test of broken default in favor of issue astropy#4708
1 parent 4c063c7 commit 55a8d4c

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

‎astropy/io/fits/tests/test_connect.py‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -656,38 +656,6 @@ def test_info_attributes_with_no_mixins(tmpdir):
656656
assert t2['col0'].meta['a'] == {'b': 'c'}
657657

658658

659-
@pytest.mark.skipif('not HAS_YAML')
660-
def test_round_trip_masked_table_default(tmpdir):
661-
"""This is a regression test showing the currently BROKEN default
662-
behavior of Table.write() to a FITS bintable. Note:
663-
664-
>>> simple_table(masked=True)
665-
<Table masked=True length=3>
666-
a b c
667-
int64 float64 str1
668-
----- ------- ----
669-
-- 1.0 c
670-
2 2.0 --
671-
3 -- e
672-
"""
673-
filename = str(tmpdir.join('test.fits'))
674-
675-
t = simple_table(masked=True)
676-
t['a'].fill_value = 2
677-
t.write(filename)
678-
t2 = Table.read(filename)
679-
680-
assert t2.masked is True
681-
assert np.all(t2['a'].mask == [True, True, False]) # This is WRONG
682-
assert np.all(t2['b'].mask == [False, False, False]) # This is WRONG
683-
assert np.all(t2['c'].mask == [False, False, False]) # This is WRONG
684-
685-
assert np.all(t2['a'] == [1, 2, 3])
686-
assert np.all(t2['b'][:2] == [1.0, 2.0]) # OK
687-
assert np.isnan(t2['b'][2]) # WRONG
688-
assert np.all(t2['c'] == ['c', 'N', 'e']) # WRONG ('N' is first char of 'N/A')
689-
690-
691659
@pytest.mark.skipif('not HAS_YAML')
692660
@pytest.mark.parametrize('method', ['set_cols', 'names', 'class'])
693661
def test_round_trip_masked_table_serialize_mask(tmpdir, method):

0 commit comments

Comments
 (0)