[Python-checkins] r88636 - python/branches/py3k/Lib/test/test_logging.py
vinay.sajip
python-checkins at python.org
Sat Feb 26 08:18:23 CET 2011
Author: vinay.sajip
Date: Sat Feb 26 08:18:22 2011
New Revision: 88636
Log:
test_logging: Changed TimedRotatingFileHandler tests to use UTC time rather than local time.
Modified:
python/branches/py3k/Lib/test/test_logging.py
Modified: python/branches/py3k/Lib/test/test_logging.py
==============================================================================
--- python/branches/py3k/Lib/test/test_logging.py (original)
+++ python/branches/py3k/Lib/test/test_logging.py Sat Feb 26 08:18:22 2011
@@ -2044,13 +2044,13 @@
('M', 60),
('H', 60 * 60),
('D', 60 * 60 * 24),
- ('MIDNIGHT', 60 * 60 * 23),
+ ('MIDNIGHT', 60 * 60 * 24),
# current time (epoch start) is a Thursday, W0 means Monday
- ('W0', secs(days=4, hours=23)),
+ ('W0', secs(days=4, hours=24)),
):
def test_compute_rollover(self, when=when, exp=exp):
rh = logging.handlers.TimedRotatingFileHandler(
- self.fn, when=when, interval=1, backupCount=0)
+ self.fn, when=when, interval=1, backupCount=0, utc=True)
currentTime = 0.0
actual = rh.computeRollover(currentTime)
if exp != actual:
More information about the Python-checkins
mailing list