From: Peter Astrand Date: Wed, 17 Nov 2004 20:06:35 +0000 (+0000) Subject: Remove tempfile after use in test_call_string. X-Git-Tag: v2.4c1~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2224be64dc1d62906ec1b3c1ab2a4986212c68ed;p=thirdparty%2FPython%2Fcpython.git Remove tempfile after use in test_call_string. In test_args_string, remove the tempfile before assertEqual. --- diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index b0d82356bca5..9f7184f057fb 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -436,8 +436,8 @@ class ProcessTestCase(unittest.TestCase): os.chmod(fname, 0700) p = subprocess.Popen(fname) p.wait() - self.assertEqual(p.returncode, 47) os.remove(fname) + self.assertEqual(p.returncode, 47) def test_invalid_args(self): # invalid arguments should raise ValueError @@ -477,6 +477,7 @@ class ProcessTestCase(unittest.TestCase): os.close(f) os.chmod(fname, 0700) rc = subprocess.call(fname) + os.remove(fname) self.assertEqual(rc, 47)