Skip to content

Commit a393695

Browse files
committed
TST: xref pandas-dev#25630
skip on PY2 & old numpy for masked arrays
1 parent 16edaaf commit a393695

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/tests/frame/test_constructors.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def test_constructor_ndarray(self):
684684
frame = DataFrame(['foo', 'bar'], index=[0, 1], columns=['A'])
685685
assert len(frame) == 2
686686

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

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

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

798+
@pytest.mark.skipif(PY2 and _np_version_under1p13,
799+
reason="old numpy & py2")
794800
def test_constructor_maskedrecarray_dtype(self):
795801
# Ensure constructor honors dtype
796802
data = np.ma.array(

0 commit comments

Comments
 (0)