|
12 | 12 | from datetime import datetime, timedelta, tzinfo, date |
13 | 13 |
|
14 | 14 | import pandas.util.testing as tm |
15 | | -import pandas.core.tools.datetimes as tools |
16 | 15 | import pandas.tseries.offsets as offsets |
17 | 16 | from pandas.compat import lrange, zip |
18 | 17 | from pandas.core.indexes.datetimes import bdate_range, date_range |
@@ -646,20 +645,20 @@ def test_infer_tz(self): |
646 | 645 |
|
647 | 646 | start = self.localize(eastern, _start) |
648 | 647 | end = self.localize(eastern, _end) |
649 | | - assert (tools._infer_tzinfo(start, end) is self.localize( |
650 | | - eastern, _start).tzinfo) |
651 | | - assert (tools._infer_tzinfo(start, None) is self.localize( |
652 | | - eastern, _start).tzinfo) |
653 | | - assert (tools._infer_tzinfo(None, end) is self.localize(eastern, |
654 | | - _end).tzinfo) |
| 648 | + assert (timezones.infer_tzinfo(start, end) is |
| 649 | + self.localize(eastern, _start).tzinfo) |
| 650 | + assert (timezones.infer_tzinfo(start, None) is |
| 651 | + self.localize(eastern, _start).tzinfo) |
| 652 | + assert (timezones.infer_tzinfo(None, end) is |
| 653 | + self.localize(eastern, _end).tzinfo) |
655 | 654 |
|
656 | 655 | start = utc.localize(_start) |
657 | 656 | end = utc.localize(_end) |
658 | | - assert (tools._infer_tzinfo(start, end) is utc) |
| 657 | + assert (timezones.infer_tzinfo(start, end) is utc) |
659 | 658 |
|
660 | 659 | end = self.localize(eastern, _end) |
661 | | - pytest.raises(Exception, tools._infer_tzinfo, start, end) |
662 | | - pytest.raises(Exception, tools._infer_tzinfo, end, start) |
| 660 | + pytest.raises(Exception, timezones.infer_tzinfo, start, end) |
| 661 | + pytest.raises(Exception, timezones.infer_tzinfo, end, start) |
663 | 662 |
|
664 | 663 | def test_tz_string(self): |
665 | 664 | result = date_range('1/1/2000', periods=10, |
|
0 commit comments