| msg186717 - (view) |
Author: Ned Batchelder (nedbat) *  |
Date: 2013-04-13 13:49 |
| I just pulled down the tip of CPython, built it, and ran the tests, and got this failure: ``` ====================================================================== FAIL: test_compute_rollover_weekly_attime (test.test_logging.TimedRotatingFileHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ned/python/cpython/Lib/test/test_logging.py", line 3972, in test_compute_rollover_weekly_attime wday = datetime.datetime.fromtimestamp(currentTime).weekday() AssertionError: 388800 != 475200 ---------------------------------------------------------------------- Ran 149 tests in 17.142s FAILED (failures=1, skipped=1) test test_logging failed 1 test failed: test_logging sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/test_logging-2-gimdv3.log' mode='a' encoding='UTF-8'> ``` Others preparing for today's sprint in Boston also had the same problem. Something to do with timezones? |
|
|
| msg186753 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-04-13 16:35 |
| New changeset 185ae0c95e5b by Vinay Sajip in branch 'default': Issue #17713: Test temporarily skipped while failure investigated. http://hg.python.org/cpython/rev/185ae0c95e5b |
|
|
| msg186819 - (view) |
Author: Shaun Hickson (sphickson) * |
Date: 2013-04-13 20:14 |
| I was looking at this yesterday and this morning a little bit, and the expected value is too large by a day (e.g. as the test currently runs, actual = expected - (24 * 60 * 60)). |
|
|
| msg186843 - (view) |
Author: Shaun Hickson (sphickson) * |
Date: 2013-04-13 20:57 |
| Patch to fix test_compute_rollover_weekly_attime: 1) Use 6 rather than 7 for calculating expected rollover day 2) Roll all cases (rollover day earlier than current day, both days the same, and current day earlier than rollover day) into one if/else statement |
|
|
| msg186845 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-04-13 21:04 |
| Shaun, your patch fails if I remove the @skip decorator: ====================================================================== FAIL: test_compute_rollover_weekly_attime (test.test_logging.TimedRotatingFileHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_logging.py", line 3989, in test_compute_rollover_weekly_attime self.assertEqual(actual, expected) AssertionError: 388800 != 302400 On the other hand, the original test works fine here. I guess the diagnosing isn't complete yet :-) |
|
|
| msg186847 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-04-13 21:08 |
| I also find the original code totally unreadable. Why "currentTime = 0"? Why no comments on the various calculations? Vinay, it would be nice if you could make some efforts here. |
|
|
| msg186911 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-04-14 11:21 |
| New changeset 1494daf809c1 by Vinay Sajip in branch 'default': Closes #17713: Fixed bug in test_compute_rollover_weekly_attime. http://hg.python.org/cpython/rev/1494daf809c1 |
|
|
| msg186912 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-04-14 11:25 |
| New changeset efda51b85b31 by Vinay Sajip in branch 'default': Issue #17713: additional tweak to test. http://hg.python.org/cpython/rev/efda51b85b31 |
|
|
| msg186972 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-04-15 10:59 |
| New changeset 193e7ad92900 by Vinay Sajip in branch 'default': Issue #17713: Added failure diagnostics to test. http://hg.python.org/cpython/rev/193e7ad92900 |
|
|