bpo-28254: Cleanup test_subprocess.test_preexec_gc_module_failure() (… · python/cpython@b1f413e (original) (raw)

Original file line number Diff line number Diff line change
@@ -2148,8 +2148,6 @@ def test_preexec_gc_module_failure(self):
2148 2148 # This tests the code that disables garbage collection if the child
2149 2149 # process will execute any Python.
2150 2150 enabled = gc.isenabled()
2151 -orig_gc_disable = gc.disable
2152 -orig_gc_isenabled = gc.isenabled
2153 2151 try:
2154 2152 gc.disable()
2155 2153 self.assertFalse(gc.isenabled())
@@ -2164,8 +2162,6 @@ def test_preexec_gc_module_failure(self):
2164 2162 preexec_fn=lambda: None)
2165 2163 self.assertTrue(gc.isenabled(), "Popen left gc disabled.")
2166 2164 finally:
2167 -gc.disable = orig_gc_disable
2168 -gc.isenabled = orig_gc_isenabled
2169 2165 if not enabled:
2170 2166 gc.disable()
2171 2167