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