[Python-checkins] cpython: Oops, fix test_microsecond_rounding()

victor.stinner python-checkins at python.org
Fri Sep 18 14:58:35 CEST 2015


https://hg.python.org/cpython/rev/c828b730abca
changeset: 98050:c828b730abca
parent: 98047:820ae8082688
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Sep 18 14:52:15 2015 +0200
summary:
 Oops, fix test_microsecond_rounding()
Test self.theclass, not datetime. Regression introduced by manual tests.
files:
 Lib/test/datetimetester.py | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -1851,8 +1851,8 @@
 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)
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /