diff --git a/pandas/tests/test_base.py b/pandas/tests/test_base.py index 071d609c6e44e..a30ce9a7dcd87 100644 --- a/pandas/tests/test_base.py +++ b/pandas/tests/test_base.py @@ -99,12 +99,12 @@ def setUp(self): def test_shallow_copying(self): original = self.container.copy() - assert_isinstance(self.container.view(), FrozenNDArray) - self.assertFalse(isinstance(self.container.view(np.ndarray), FrozenNDArray)) + self.assertIsInstance(self.container.view(), FrozenNDArray) + self.assertNotIsInstance(self.container.view(np.ndarray), FrozenNDArray) self.assertIsNot(self.container.view(), self.container) self.assert_numpy_array_equal(self.container, original) # shallow copy should be the same too - assert_isinstance(self.container._shallow_copy(), FrozenNDArray) + self.assertIsInstance(self.container._shallow_copy(), FrozenNDArray) # setting should not be allowed def testit(container): container[0] = 16 diff --git a/pandas/tests/test_categorical.py b/pandas/tests/test_categorical.py index e4d7ef2f9a8c6..5df3cb4403c12 100644 --- a/pandas/tests/test_categorical.py +++ b/pandas/tests/test_categorical.py @@ -1,4 +1,4 @@ -# pylint: disable=E1101,E1103,W0232 +#pylint: disable=E1101,E1103,W0232 from datetime import datetime from pandas.compat import range, lrange, u diff --git a/pandas/tests/test_testing.py b/pandas/tests/test_testing.py index c3c1c4f5977e6..055b5816120a1 100644 --- a/pandas/tests/test_testing.py +++ b/pandas/tests/test_testing.py @@ -10,6 +10,7 @@ from pandas.util.testing import ( assert_almost_equal, assertRaisesRegexp, raise_with_traceback, assert_series_equal ) +from pandas.util import testing # let's get meta. @@ -153,3 +154,11 @@ def test_not_equal(self): # ATM meta data is not checked in assert_series_equal # self._assert_not_equal(Series(range(3)),Series(range(3),name='foo'),check_names=True) + +class TestAssertNumpyArrayEquals(testing.TestCase): + + def test_equal(self): + np_array = np.array([1, 2, 3]) + equal_array = np.array([1, 2, 3]) + self.assert_numpy_array_equal(np_array, equal_array) +