diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2010-12-13 06:45:02 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2010-12-13 06:45:02 (GMT) |
commit | f5604853889bfbbf84b48311c63c0e775dff38cc (patch) | |
tree | 658b18dc71ef66d0132e26b30821a2a385b4a639 /Lib/test | |
parent | 8d28a92eda3b5ab03552f6cf6b1cdce27445fb3e (diff) | |
download | cpython-f5604853889bfbbf84b48311c63c0e775dff38cc.zip cpython-f5604853889bfbbf84b48311c63c0e775dff38cc.tar.gz cpython-f5604853889bfbbf84b48311c63c0e775dff38cc.tar.bz2 |
Get rid of the close_fds DeprecationWarning. Changes the default on a per
platform basis. It remains False on Windows and changes to True on all
other platforms (POSIX). Based on python-dev discussion and
http://bugs.python.org/issue7213.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_subprocess.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index f07f490..eaa26d2 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -58,22 +58,6 @@ class BaseTestCase(unittest.TestCase): self.assertEqual(actual, expected, msg) -class DeprecationWarningTests(BaseTestCase): - def testCloseFdsWarning(self): - quick_process = [sys.executable, "-c", "import sys; sys.exit(0)"] - with warnings.catch_warnings(record=True) as warnlist: - warnings.simplefilter("always") - subprocess.call(quick_process, close_fds=True) - self.assertEqual([], warnlist) - subprocess.call(quick_process, close_fds=False) - self.assertEqual([], warnlist) - with self.assertWarns(DeprecationWarning) as wm: - subprocess.Popen(quick_process).wait() - self.assertEqual(1, len(wm.warnings)) - self.assertIn('close_fds parameter was not specified', - str(wm.warnings[0])) - - class ProcessTestCase(BaseTestCase): def test_call_seq(self): @@ -1250,8 +1234,7 @@ def test_main(): ProcessTestCaseNoPoll, HelperFunctionTests, CommandsWithSpaces, - ContextManagerTests, - DeprecationWarningTests) + ContextManagerTests) support.run_unittest(*unit_tests) support.reap_children() |