Relax datetime.timestamp() test around DST change

This commit is contained in:
Alexander Belopolsky 2012-06-08 13:00:27 -04:00
parent 0c687e5e88
commit f6f56183ee
1 changed files with 1 additions and 1 deletions

View File

@ -1747,7 +1747,7 @@ class TestDateTime(TestDate):
# Missing hour may produce platform-dependent result
t = self.theclass(2012, 3, 11, 2, 30)
self.assertIn(self.theclass.fromtimestamp(t.timestamp()),
[t, t + timedelta(hours=1)])
[t - timedelta(hours=1), t + timedelta(hours=1)])
# Ambiguous hour defaults to DST
t = self.theclass(2012, 11, 4, 1, 30)
self.assertEqual(self.theclass.fromtimestamp(t.timestamp()), t)