Closed
Description
https://travis-ci.org/github/pandas-dev/pandas/jobs/697381484#L3750
____________________ TestDtype.test_check_dtype[Int64Dtype] ____________________
[gw1] linux -- Python 3.9.0 /home/travis/virtualenv/python3.9-dev/bin/python
self = <pandas.tests.extension.test_integer.TestDtype object at 0x7f1440e52280>
data = <IntegerArray>
[ 1, 2, 3, 4, 5, 6, 7, 8, <NA>, 10, 11, 12, 13,
14, 15, 16, 17,...5, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, <NA>, 99, 100]
Length: 100, dtype: Int64
def test_check_dtype(self, data):
dtype = data.dtype
# check equivalency for using .dtypes
df = pd.DataFrame(
{"A": pd.Series(data, dtype=dtype), "B": data, "C": "foo", "D": 1}
)
# np.dtype('int64') == 'Int64' == 'int64'
# so can't distinguish
if dtype.name == "Int64":
expected = pd.Series([True, True, False, True], index=list("ABCD"))
else:
expected = pd.Series([True, True, False, False], index=list("ABCD"))
# FIXME: This should probably be *fixed* not ignored.
# See libops.scalar_compare
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
result = df.dtypes == str(dtype)
> self.assert_series_equal(result, expected)
pandas/tests/extension/base/dtype.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/extension/base/base.py:13: in assert_series_equal
return tm.assert_series_equal(left, right, *args, **kwargs)
pandas/_libs/testing.pyx:68: in pandas._libs.testing.assert_almost_equal
cpdef assert_almost_equal(a, b,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise_assert_detail(obj, msg, lobj, robj, index_values=index_values)
E AssertionError: Series are different
E
E Series values are different (25.0 %)
E [index]: [A, B, C, D]
E [left]: [True, True, False, False]
E [right]: [True, True, False, True]
pandas/_libs/testing.pyx:183: AssertionError
There's a note there about not ignoring the warning. I wonder if that's been changed.