mirror of https://github.com/python/cpython
merge
This commit is contained in:
commit
f804f3a507
|
@ -3484,6 +3484,7 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
|
|||
def test_rollover(self):
|
||||
fh = logging.handlers.TimedRotatingFileHandler(self.fn, 'S',
|
||||
backupCount=1)
|
||||
try:
|
||||
r = logging.makeLogRecord({'msg': 'testing'})
|
||||
fh.emit(r)
|
||||
self.assertLogFile(self.fn)
|
||||
|
@ -3506,7 +3507,8 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
|
|||
for fn in (fn1, fn2):
|
||||
if os.path.exists(fn):
|
||||
self.rmfiles.append(fn)
|
||||
|
||||
finally:
|
||||
fh.close()
|
||||
|
||||
def test_invalid(self):
|
||||
assertRaises = self.assertRaises
|
||||
|
|
Loading…
Reference in New Issue