diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-11-05 02:06:13 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-11-05 02:06:13 +0100 |
commit | eb9da6b01ca6d58a6de44d47e365318794459baf (patch) | |
tree | d29f2b5c783e11d7d308b9330d0b6588790347a1 /Lib/test/test_email | |
parent | 1bcb08968fccf03b5c78215b15ca927c891c795c (diff) | |
download | cpython-eb9da6b01ca6d58a6de44d47e365318794459baf.tar.gz |
Close #15165: Fix test_email on Windows 64 bits
Use year 1990 instead of year 1970 to avoid issues with negative timestamps.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r-- | Lib/test/test_email/test_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py index 0ade770112..622ef3a9c9 100644 --- a/Lib/test/test_email/test_utils.py +++ b/Lib/test/test_email/test_utils.py @@ -91,7 +91,7 @@ class LocaltimeTests(unittest.TestCase): @test.support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0') def test_localtime_epoch_utc_daylight_true(self): test.support.patch(self, time, 'daylight', True) - t0 = datetime.datetime(1970, 1, 1, tzinfo = datetime.timezone.utc) + t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc) t1 = utils.localtime(t0) t2 = t0 - datetime.timedelta(hours=5) t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5))) @@ -100,7 +100,7 @@ class LocaltimeTests(unittest.TestCase): @test.support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0') def test_localtime_epoch_utc_daylight_false(self): test.support.patch(self, time, 'daylight', False) - t0 = datetime.datetime(1970, 1, 1, tzinfo = datetime.timezone.utc) + t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc) t1 = utils.localtime(t0) t2 = t0 - datetime.timedelta(hours=5) t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5))) @@ -108,14 +108,14 @@ class LocaltimeTests(unittest.TestCase): def test_localtime_epoch_notz_daylight_true(self): test.support.patch(self, time, 'daylight', True) - t0 = datetime.datetime(1970, 1, 1) + t0 = datetime.datetime(1990, 1, 1) t1 = utils.localtime(t0) t2 = utils.localtime(t0.replace(tzinfo=None)) self.assertEqual(t1, t2) def test_localtime_epoch_notz_daylight_false(self): test.support.patch(self, time, 'daylight', False) - t0 = datetime.datetime(1970, 1, 1) + t0 = datetime.datetime(1990, 1, 1) t1 = utils.localtime(t0) t2 = utils.localtime(t0.replace(tzinfo=None)) self.assertEqual(t1, t2) |