diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2016-03-25 19:42:59 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2016-03-25 19:42:59 (GMT) |
commit | 1dcf4f9ee5b60f23291a377353b3dceca7cc9dc9 (patch) | |
tree | 12df3e33f597e65096dbe0e532e3c88517928f36 /Lib/test/datetimetester.py | |
parent | 84ca9fe14533d7fca2cf5c18d3cba3e72c8204ae (diff) | |
download | cpython-1dcf4f9ee5b60f23291a377353b3dceca7cc9dc9.zip cpython-1dcf4f9ee5b60f23291a377353b3dceca7cc9dc9.tar.gz cpython-1dcf4f9ee5b60f23291a377353b3dceca7cc9dc9.tar.bz2 |
Issue#26616:Fixed a bug in datetime.astimezone() method.
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r-- | Lib/test/datetimetester.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 7743c67..b907164 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -3426,6 +3426,14 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase, unittest.TestCase): self.assertEqual(dt, local) self.assertEqual(local.strftime("%z %Z"), "-0400 EDT") + @support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0') + def test_astimezone_default_near_fold(self): + # Issue #26616. + u = datetime(2015, 11, 1, 5, tzinfo=timezone.utc) + t = u.astimezone() + s = t.astimezone() + self.assertEqual(t.tzinfo, s.tzinfo) + def test_aware_subtract(self): cls = self.theclass |