]> granicus.if.org Git - python/commitdiff
Oops, fix test_microsecond_rounding()
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 18 Sep 2015 12:52:15 +0000 (14:52 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 18 Sep 2015 12:52:15 +0000 (14:52 +0200)
Test self.theclass, not datetime. Regression introduced by manual tests.

Lib/test/datetimetester.py

index 5d2df323a9206fbcfa0cb34f492dcc101d3d9d73..a6c742100d6c868cc9caa294012b7b7a0d3c8599 100644 (file)
@@ -1851,8 +1851,8 @@ class TestDateTime(TestDate):
                          18000 + 3600 + 2*60 + 3 + 4*1e-6)
 
     def test_microsecond_rounding(self):
-        for fts in (datetime.fromtimestamp,
-                    self.theclass.utcfromtimestamp):
+        for fts in [self.theclass.fromtimestamp,
+                    self.theclass.utcfromtimestamp]:
             zero = fts(0)
             self.assertEqual(zero.second, 0)
             self.assertEqual(zero.microsecond, 0)