(self)
| 909 | assert dt == dt_exp |
| 910 | |
| 911 | def test_tzlocal_parse_fold(self): |
| 912 | # One manifestion of GH #318 |
| 913 | with TZEnvContext('EST+5EDT,M3.2.0/2,M11.1.0/2'): |
| 914 | dt_exp = datetime(2011, 11, 6, 1, 30, tzinfo=tz.tzlocal()) |
| 915 | dt_exp = tz.enfold(dt_exp, fold=1) |
| 916 | dt = parse('2011-11-06T01:30 EST') |
| 917 | |
| 918 | # Because this is ambiguous, until `tz.tzlocal() is tz.tzlocal()` |
| 919 | # we'll just check the attributes we care about rather than |
| 920 | # dt == dt_exp |
| 921 | assert dt.tzname() == dt_exp.tzname() |
| 922 | assert dt.replace(tzinfo=None) == dt_exp.replace(tzinfo=None) |
| 923 | assert getattr(dt, 'fold') == getattr(dt_exp, 'fold') |
| 924 | assert dt.astimezone(tz.UTC) == dt_exp.astimezone(tz.UTC) |
| 925 | |
| 926 | |
| 927 | def test_parse_tzinfos_fold(): |
nothing calls this directly
no test coverage detected