浏览代码

Ensure that a Popen object is closed promptly during the tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Alex Gaynor 14 年之前
父节点
当前提交
3863c906ce
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      tests/regressiontests/admin_scripts/tests.py

+ 1 - 0
tests/regressiontests/admin_scripts/tests.py

@@ -119,6 +119,7 @@ class AdminScriptTestCase(unittest.TestCase):
             from subprocess import Popen, PIPE
             p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
             stdin, stdout, stderr = (p.stdin, p.stdout, p.stderr)
+            p.wait()
         except ImportError:
             stdin, stdout, stderr = os.popen3(cmd)
         out, err = stdout.read(), stderr.read()