[issue17313] test_logging doesn't clean up after itself
New submission from Chris Jerdonek: test_logging leaves behind a file called test.log in the current working directory. I haven't narrowed down to the specific test, and I'm not sure what other versions are affected. -- components: Tests messages: 183176 nosy: chris.jerdonek, vinay.sajip priority: normal severity: normal stage: needs patch status: open title: test_logging doesn't clean up after itself type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17313] test_logging doesn't clean up after itself
Vinay Sajip added the comment: There are only three logging tests that open a handler to test.log: test_filename, test_filemode and test_incompatible. AFAIK those tests have remained unchanged over several years, if not months. Is the failure repeatable? Which platform did the failure occur on? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17313] test_logging doesn't clean up after itself
Vinay Sajip added the comment: I investigated a little further. The file is created in the test directory (build/test_python_/) and, I assume, the dir is wiped at the end of the test. I can go through and do an addCleanup(os.remove, 'test.log') in the relevant tests; that should do it. It probably affects all versions - I'm not sure it's worth bothering to change 2.x versions, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17313] test_logging doesn't clean up after itself
Chris Jerdonek added the comment: Thanks for investigating. Yes, currently regrtest.py deletes the containing directory. But this doesn't happen when running with plain unittest. If each test cleans up after itself, this will give us more flexibility in moving from regrtest to a unittest-based approach (there is an issue about this). Currently, test_logging seems to be one of only a few test modules that don't do this. It's probably okay to make the fix only in 3.4 since we won't be making progress on moving away from regrtest in maintenance releases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17313] test_logging doesn't clean up after itself
Roundup Robot added the comment: New changeset b7f5bff33c22 by Vinay Sajip in branch 'default': Closes #17313: Deleted test file created by test_logging. http://hg.python.org/cpython/rev/b7f5bff33c22 -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com