|
8 | 8 | import dateutil |
9 | 9 | from dateutil.parser import parse |
10 | 10 | from dateutil.tz.tz import tzoffset |
11 | | -from hypothesis import given |
12 | | -from hypothesis.extra.pytz import timezones |
13 | | -from hypothesis.strategies import datetimes |
14 | 11 | import numpy as np |
15 | 12 | import pytest |
16 | 13 | import pytz |
@@ -520,27 +517,6 @@ def test_to_datetime_different_offsets(self, cache): |
520 | 517 | result = pd.to_datetime(arr, cache=cache) |
521 | 518 | tm.assert_index_equal(result, expected) |
522 | 519 |
|
523 | | - @pytest.mark.parametrize('errors', ('ignore', 'coerce', 'raise')) |
524 | | - @pytest.mark.parametrize('suffix', ([], ['foo'])) |
525 | | - @pytest.mark.parametrize('convertor', (lambda x: x, str)) |
526 | | - @given(date1=datetimes(timezones=timezones()), |
527 | | - date2=datetimes(timezones=timezones())) |
528 | | - def test_to_datetime_cache_invariance(self, date1, date2, suffix, |
529 | | - errors, convertor): |
530 | | - # prepare a list of dates to parse with some duplicates |
531 | | - # and possible invalid string |
532 | | - arg = [convertor(date1), convertor(date2)] * 5 + suffix |
533 | | - |
534 | | - def _get_answer(cache): |
535 | | - try: |
536 | | - return pd.to_datetime(arg, cache=cache, errors=errors) |
537 | | - except ValueError as err: |
538 | | - return err.args |
539 | | - |
540 | | - cache_on = _get_answer(cache=True) |
541 | | - cache_off = _get_answer(cache=False) |
542 | | - tm.assert_almost_equal(cache_on, cache_off) |
543 | | - |
544 | 520 | @pytest.mark.parametrize('cache', [True, False]) |
545 | 521 | def test_to_datetime_tz_pytz(self, cache): |
546 | 522 | # see gh-8260 |
|
0 commit comments