summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-05-13 13:45:08 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-05-13 13:45:08 (GMT)
commita171f9c6a3c8cdf8ab25b0e0b1e4359d97b7fb85 (patch)
treef6ee6c8cfae862bade164caf9bf4e3592328016e /Lib/test/test_logging.py
parenta552ca6fd0179b3bda4138c8ea0f129898a81451 (diff)
downloadcpython-a171f9c6a3c8cdf8ab25b0e0b1e4359d97b7fb85.zip
cpython-a171f9c6a3c8cdf8ab25b0e0b1e4359d97b7fb85.tar.gz
cpython-a171f9c6a3c8cdf8ab25b0e0b1e4359d97b7fb85.tar.bz2
test_logging: fixed bug in failure diagnostics.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 505ce6e..f215834 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)