From a171f9c6a3c8cdf8ab25b0e0b1e4359d97b7fb85 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Fri, 13 May 2011 14:45:08 +0100 Subject: [PATCH] test_logging: fixed bug in failure diagnostics. --- Lib/test/test_logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 505ce6e3b66..f215834c628 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -3526,8 +3526,8 @@ class TimedRotatingFileHandlerTest(BaseFileTest): 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)