summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_subprocess.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 7c79365f41..27ccd3e5cb 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -2147,8 +2147,6 @@ class POSIXProcessTestCase(BaseTestCase):
def test_preexec_gc_module_failure(self):
# This tests the code that disables garbage collection if the child
# process will execute any Python.
- def raise_runtime_error():
- raise RuntimeError("this shouldn't escape")
enabled = gc.isenabled()
orig_gc_disable = gc.disable
orig_gc_isenabled = gc.isenabled
@@ -2165,16 +2163,6 @@ class POSIXProcessTestCase(BaseTestCase):
subprocess.call([sys.executable, '-c', ''],
preexec_fn=lambda: None)
self.assertTrue(gc.isenabled(), "Popen left gc disabled.")
-
- gc.disable = raise_runtime_error
- self.assertRaises(RuntimeError, subprocess.Popen,
- [sys.executable, '-c', ''],
- preexec_fn=lambda: None)
-
- del gc.isenabled # force an AttributeError
- self.assertRaises(AttributeError, subprocess.Popen,
- [sys.executable, '-c', ''],
- preexec_fn=lambda: None)
finally:
gc.disable = orig_gc_disable
gc.isenabled = orig_gc_isenabled