From 7c126794556f1ca20194cfa0a9e066d99a34de24 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 2 Apr 2017 05:06:36 +0000 Subject: [PATCH] BF: skip equivalence test for itemsize and nbytes if "values" ndarray view of type object Gbp-Pq: Name changeset_848ce49a9f006eadfd169d2fc545a5d15b616f7c.diff --- pandas/tests/indexes/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/indexes/common.py b/pandas/tests/indexes/common.py index 1b373baf..a3205fac 100644 --- a/pandas/tests/indexes/common.py +++ b/pandas/tests/indexes/common.py @@ -127,6 +127,12 @@ class Base(object): values = idx.values for prop in self._compat_props: + # skip equivalency check if converted type is object, as happens + # for PeriodIndex, since then object (address) would be 4 bytes + # on 32bit platforms and equivalence to int64 of original + # date time is just accidental + if prop in ('itemsize', 'nbytes') and values.dtype.name == 'object': + continue self.assertEqual(getattr(idx, prop), getattr(values, prop)) # test for validity -- 2.30.2