Skip to content

Commit

Permalink
TST: xref pandas-dev#25630
Browse files Browse the repository at this point in the history
skip on PY2 & old numpy for masked arrays
  • Loading branch information
jreback committed Mar 10, 2019
1 parent 16edaaf commit a393695
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pandas/tests/frame/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def test_constructor_ndarray(self):
frame = DataFrame(['foo', 'bar'], index=[0, 1], columns=['A'])
assert len(frame) == 2

@pytest.mark.skipif(PY2 & _np_version_under1p13,
@pytest.mark.skipif(PY2 and _np_version_under1p13,
reason="old numpy & py2")
def test_constructor_maskedarray(self):
self._check_basic_constructor(ma.masked_all)
Expand All @@ -702,6 +702,8 @@ def test_constructor_maskedarray(self):
frame = DataFrame(mat, columns=['A', 'B', 'C'], index=[1, 2])
assert np.all(~np.asarray(frame == frame))

@pytest.mark.skipif(PY2 and _np_version_under1p13,
reason="old numpy & py2")
def test_constructor_maskedarray_nonfloat(self):
# masked int promoted to float
mat = ma.masked_all((2, 3), dtype=int)
Expand Down Expand Up @@ -769,6 +771,8 @@ def test_constructor_maskedarray_nonfloat(self):
assert frame['A'][1] is True
assert frame['C'][2] is False

@pytest.mark.skipif(PY2 and _np_version_under1p13,
reason="old numpy & py2")
def test_constructor_maskedarray_hardened(self):
# Check numpy masked arrays with hard masks -- from GH24574
mat_hard = ma.masked_all((2, 2), dtype=float).harden_mask()
Expand All @@ -791,6 +795,8 @@ def test_constructor_maskedarray_hardened(self):
dtype=float)
tm.assert_frame_equal(result, expected)

@pytest.mark.skipif(PY2 and _np_version_under1p13,
reason="old numpy & py2")
def test_constructor_maskedrecarray_dtype(self):
# Ensure constructor honors dtype
data = np.ma.array(
Expand Down

0 comments on commit a393695

Please sign in to comment.