mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
test_logging: fixed bug in failure diagnostics.
This commit is contained in:
parent
a552ca6fd0
commit
a171f9c6a3
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue