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
This commit is contained in:
parent
68a04f2d62
commit
3863c906ce
|
@ -119,6 +119,7 @@ class AdminScriptTestCase(unittest.TestCase):
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
||||||
stdin, stdout, stderr = (p.stdin, p.stdout, p.stderr)
|
stdin, stdout, stderr = (p.stdin, p.stdout, p.stderr)
|
||||||
|
p.wait()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
stdin, stdout, stderr = os.popen3(cmd)
|
stdin, stdout, stderr = os.popen3(cmd)
|
||||||
out, err = stdout.read(), stderr.read()
|
out, err = stdout.read(), stderr.read()
|
||||||
|
|
Loading…
Reference in New Issue