diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-01-16 19:00:43 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-01-16 19:06:00 -0700 |
commit | e0cb3f79936656d6d2f48cbad46a3a9f2bad5ae1 (patch) | |
tree | d8b1410f9082ee82a4a7eb0d41b3a4dc3fe52ac4 /numpy/testing/tests | |
parent | ad4b5b03470a4ca2ef3150faa721a0e239b3c203 (diff) | |
download | numpy-e0cb3f79936656d6d2f48cbad46a3a9f2bad5ae1.tar.gz |
Revert "Merge pull request #7001 from shoyer/NaT-comparison"
This reverts commit 7141f40b58ed1e7071cde78ab7bc8ab37e9c5983,
reversing changes made to 8fa6e3bef26a6d4a2c92f2824129aa4409be2590.
The original broke some pandas tests. The current plan to get this
in is
* reversion
* issue FutureWarning in 1.11 and 1.12
* make the change in 1.13.
Diffstat (limited to 'numpy/testing/tests')
-rw-r--r-- | numpy/testing/tests/test_utils.py | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index 92a00f712..23bd491bc 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -11,7 +11,7 @@ from numpy.testing import ( assert_warns, assert_no_warnings, assert_allclose, assert_approx_equal, assert_array_almost_equal_nulp, assert_array_max_ulp, clear_and_catch_warnings, run_module_suite, - assert_string_equal, assert_, tempdir, temppath, + assert_string_equal, assert_, tempdir, temppath, ) import unittest @@ -119,25 +119,6 @@ class TestArrayEqual(_GenericTest, unittest.TestCase): c = np.array([1, 2, 3]) self._test_not_equal(c, b) - def test_nat_array_datetime(self): - a = np.array([np.datetime64('2000-01'), np.datetime64('NaT')]) - b = np.array([np.datetime64('2000-01'), np.datetime64('NaT')]) - self._test_equal(a, b) - - c = np.array([np.datetime64('NaT'), np.datetime64('NaT')]) - self._test_not_equal(c, b) - - def test_nat_array_timedelta(self): - a = np.array([np.timedelta64(1, 'h'), np.timedelta64('NaT')]) - b = np.array([np.timedelta64(1, 'h'), np.timedelta64('NaT')]) - self._test_equal(a, b) - - c = np.array([np.timedelta64('NaT'), np.timedelta64('NaT')]) - self._test_not_equal(c, b) - - d = np.array([np.datetime64('NaT'), np.datetime64('NaT')]) - self._test_not_equal(c, d) - def test_string_arrays(self): """Test two arrays with different shapes are found not equal.""" a = np.array(['floupi', 'floupa']) @@ -246,16 +227,6 @@ class TestEqual(TestArrayEqual): self._assert_func(x, x) self._test_not_equal(x, y) - def test_nat(self): - dt = np.datetime64('2000-01-01') - dt_nat = np.datetime64('NaT') - td_nat = np.timedelta64('NaT') - self._assert_func(dt_nat, dt_nat) - self._assert_func(td_nat, td_nat) - self._test_not_equal(dt_nat, td_nat) - self._test_not_equal(dt, td_nat) - self._test_not_equal(dt, dt_nat) - class TestArrayAlmostEqual(_GenericTest, unittest.TestCase): @@ -486,7 +457,7 @@ class TestWarns(unittest.TestCase): class TestAssertAllclose(unittest.TestCase): - + def test_simple(self): x = 1e-3 y = 1e-9 |