Kaydet (Commit) 66940a11 authored tarafından Vinay Sajip's avatar Vinay Sajip

Issue #17713: Added failure diagnostics to test.

üst 77282cb4
...@@ -3988,12 +3988,16 @@ class TimedRotatingFileHandlerTest(BaseFileTest): ...@@ -3988,12 +3988,16 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
expected += 12 * 60 * 60 expected += 12 * 60 * 60
# Add in adjustment for today # Add in adjustment for today
expected += today expected += today
actual = rh.computeRollover(currentTime) actual = rh.computeRollover(today)
if actual != expected:
print('failed in timezone: %d' % time.timezone)
self.assertEqual(actual, expected) self.assertEqual(actual, expected)
if day == wday: if day == wday:
# goes into following week # goes into following week
expected += 7 * 24 * 60 * 60 expected += 7 * 24 * 60 * 60
actual = rh.computeRollover(today + 13 * 60 * 60) actual = rh.computeRollover(today + 13 * 60 * 60)
if actual != expected:
print('failed in timezone: %d' % time.timezone)
self.assertEqual(actual, expected) self.assertEqual(actual, expected)
finally: finally:
rh.close() rh.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment