mirror of https://github.com/python/cpython
Added additional output to help diagnose buildbot failures.
This commit is contained in:
parent
2c0d721663
commit
28338fbdba
|
@ -3494,9 +3494,19 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
|
||||||
earlier = now - datetime.timedelta(seconds=2)
|
earlier = now - datetime.timedelta(seconds=2)
|
||||||
fn1 = self.fn + prevsec.strftime(".%Y-%m-%d_%H-%M-%S")
|
fn1 = self.fn + prevsec.strftime(".%Y-%m-%d_%H-%M-%S")
|
||||||
fn2 = self.fn + earlier.strftime(".%Y-%m-%d_%H-%M-%S")
|
fn2 = self.fn + earlier.strftime(".%Y-%m-%d_%H-%M-%S")
|
||||||
self.assertTrue(os.path.exists(fn1) or
|
success = os.path.exists(fn1) or os.path.exists(fn2)
|
||||||
os.path.exists(fn2),
|
if not success:
|
||||||
msg="Neither exists: %s nor %s" % (fn1, fn2))
|
# print additional diagnostic information
|
||||||
|
print('Neither %s nor %s exists' % (fn1, fn2), file=sys.stderr)
|
||||||
|
dirname = os.path.dirname(fn1)
|
||||||
|
files = os.listdir(dirname)
|
||||||
|
files = [f for f in files if f.startswith('test_logging-2-')]
|
||||||
|
print('matching files: %s' % files, file=sys.stderr)
|
||||||
|
self.assertTrue(success)
|
||||||
|
for fn in (fn1, fn2):
|
||||||
|
if os.path.exists(fn):
|
||||||
|
self.rmfiles.append(fn)
|
||||||
|
|
||||||
|
|
||||||
def test_invalid(self):
|
def test_invalid(self):
|
||||||
assertRaises = self.assertRaises
|
assertRaises = self.assertRaises
|
||||||
|
|
Loading…
Reference in New Issue