Skip to content

Commit

Permalink
Close log file.
Browse files Browse the repository at this point in the history
  • Loading branch information
adiroiban committed Oct 12, 2023
1 parent f22eb6e commit 77f4e16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/twisted/test/test_twistd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,8 @@ def test_getLogObserverDefaultFile(self):
"""
logFiles = _patchTextFileLogObserver(self.patch)
logger = UnixAppLogger({"logfile": "", "nodaemon": False})
logger._getLogObserver()
observer = logger._getLogObserver()
self.addCleanup(observer._outFile.close)

self.assertEqual(len(logFiles), 1)
self.assertEqual(logFiles[0].path, os.path.abspath("twistd.log"))
Expand Down

0 comments on commit 77f4e16

Please sign in to comment.