Commits

Anonymous committed f531130

Remove tempfile after use in test_call_string.
In test_args_string, remove the tempfile before assertEqual.

  • Participants
  • Parent commits e01a17b
  • Branches legacy-trunk

Comments (0)

Files changed (1)

Lib/test/test_subprocess.py

             os.chmod(fname, 0700)
             p = subprocess.Popen(fname)
             p.wait()
+            os.remove(fname)
             self.assertEqual(p.returncode, 47)
-            os.remove(fname)
 
         def test_invalid_args(self):
             # invalid arguments should raise ValueError
             os.close(f)
             os.chmod(fname, 0700)
             rc = subprocess.call(fname)
+            os.remove(fname)
             self.assertEqual(rc, 47)