mirror of
https://github.com/python/cpython.git
synced 2025-09-28 19:25:27 +00:00
merge
This commit is contained in:
commit
f804f3a507
1 changed files with 25 additions and 23 deletions
|
@ -3484,6 +3484,7 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
|
||||||
def test_rollover(self):
|
def test_rollover(self):
|
||||||
fh = logging.handlers.TimedRotatingFileHandler(self.fn, 'S',
|
fh = logging.handlers.TimedRotatingFileHandler(self.fn, 'S',
|
||||||
backupCount=1)
|
backupCount=1)
|
||||||
|
try:
|
||||||
r = logging.makeLogRecord({'msg': 'testing'})
|
r = logging.makeLogRecord({'msg': 'testing'})
|
||||||
fh.emit(r)
|
fh.emit(r)
|
||||||
self.assertLogFile(self.fn)
|
self.assertLogFile(self.fn)
|
||||||
|
@ -3506,7 +3507,8 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
|
||||||
for fn in (fn1, fn2):
|
for fn in (fn1, fn2):
|
||||||
if os.path.exists(fn):
|
if os.path.exists(fn):
|
||||||
self.rmfiles.append(fn)
|
self.rmfiles.append(fn)
|
||||||
|
finally:
|
||||||
|
fh.close()
|
||||||
|
|
||||||
def test_invalid(self):
|
def test_invalid(self):
|
||||||
assertRaises = self.assertRaises
|
assertRaises = self.assertRaises
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue