This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients dstufft, eric.araujo, serhiy.storchaka, vstinner
Date 2015-11-12.13:07:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447333622.59.0.208201255111.issue25607@psf.upfronthosting.co.za>
In-reply-to
Content
Instead of a context manager, why not adding a addCleanup() in setUp() method of test cases?

You might also add a "resource" test in regrtest, but this one might be overkill, since tests using distutils are known (test_distutils), no?

Lib/distutils/tests/support.py:

+    threshold = log.set_threshold(log.WARN)
+    log.set_threshold(threshold)
+    yield threshold

I would prefer to have a log.get_threshold() function (or log._get_threshold() if you don't want to modify the public API), or even read log._global_log.threshold.

test_shutil.py:

-        with support.change_cwd(root_dir), captured_stdout():
+        with support.change_cwd(root_dir):

Why do you remove captured_stdout() here?
History
Date User Action Args
2015-11-12 13:07:02vstinnersetrecipients: + vstinner, eric.araujo, serhiy.storchaka, dstufft
2015-11-12 13:07:02vstinnersetmessageid: <1447333622.59.0.208201255111.issue25607@psf.upfronthosting.co.za>
2015-11-12 13:07:02vstinnerlinkissue25607 messages
2015-11-12 13:07:01vstinnercreate