[Python-checkins] cpython: test_logging: fixed bug in failure diagnostics.

vinay.sajip python-checkins at python.org
Fri May 13 15:45:15 CEST 2011


http://hg.python.org/cpython/rev/dfa442d1ce12
changeset: 70076:dfa442d1ce12
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Fri May 13 14:45:08 2011 +0100
summary:
 test_logging: fixed bug in failure diagnostics.
files:
 Lib/test/test_logging.py | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -3526,8 +3526,8 @@
 msg = 'No rotated files found, went back %d seconds' % GO_BACK
 if not found:
 #print additional diagnostics
- dn = os.path.dirname(self.fn)
- files = [f for f in os.listdir(dn) if f.startswith(self.fn)]
+ dn, fn = os.path.split(self.fn)
+ files = [f for f in os.listdir(dn) if f.startswith(fn)]
 print('Test time: %s' % now.strftime("%Y-%m-%d %H-%M-%S"))
 print('The only matching files are: %s' % files)
 self.assertTrue(found, msg=msg)
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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