From 76dca557175d936be5c0f0908a7fe6dd0cd2f39f Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Tue, 28 Jan 2020 19:34:03 -0800 Subject: [PATCH 1/2] dont pass dtype to datetime64 --- pandas/tests/scalar/timedelta/test_arithmetic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/scalar/timedelta/test_arithmetic.py b/pandas/tests/scalar/timedelta/test_arithmetic.py index ce08a47f824ee..5fc991df49424 100644 --- a/pandas/tests/scalar/timedelta/test_arithmetic.py +++ b/pandas/tests/scalar/timedelta/test_arithmetic.py @@ -498,7 +498,7 @@ def test_td_rfloordiv_invalid_scalar(self): # GH#18846 td = Timedelta(hours=3, minutes=3) - dt64 = np.datetime64("2016-01-01", dtype="datetime64[us]") + dt64 = np.datetime64("2016-01-01", "us") with pytest.raises(TypeError): td.__rfloordiv__(dt64) From fcdd8af54957c2414f15cb5d0d5c10b70d0aec48 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Tue, 28 Jan 2020 20:00:42 -0800 Subject: [PATCH 2/2] troubleshoot npdev build --- pandas/tests/scalar/timestamp/test_timestamp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/scalar/timestamp/test_timestamp.py b/pandas/tests/scalar/timestamp/test_timestamp.py index e9c0ee12fc000..692eb6cd8bc43 100644 --- a/pandas/tests/scalar/timestamp/test_timestamp.py +++ b/pandas/tests/scalar/timestamp/test_timestamp.py @@ -565,7 +565,7 @@ def test_bounds_with_different_units(self): for date_string in out_of_bounds_dates: for unit in time_units: - dt64 = np.datetime64(date_string, dtype="M8[{unit}]".format(unit=unit)) + dt64 = np.datetime64(date_string, unit) with pytest.raises(ValueError): Timestamp(dt64) @@ -573,7 +573,7 @@ def test_bounds_with_different_units(self): for date_string in in_bounds_dates: for unit in time_units: - dt64 = np.datetime64(date_string, dtype="M8[{unit}]".format(unit=unit)) + dt64 = np.datetime64(date_string, unit) Timestamp(dt64) def test_min_valid(self):