Commit b6f37541 authored by Antoine Pitrou's avatar Antoine Pitrou

Merged revisions 75967 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75967 | antoine.pitrou | 2009-10-30 22:41:22 +0100 (ven., 30 oct. 2009) | 3 lines

  Try to fix transient refleaks in test_pydoc.
........
parent 252ce81f
......@@ -9,7 +9,8 @@ import inspect
import unittest
import test.support
from contextlib import contextmanager
from test.support import TESTFN, forget, rmtree, EnvironmentVarGuard
from test.support import (
TESTFN, forget, rmtree, EnvironmentVarGuard, reap_children)
from test import pydoc_mod
......@@ -195,8 +196,11 @@ def run_pydoc(module_name, *args):
output of pydoc.
"""
cmd = [sys.executable, pydoc.__file__, " ".join(args), module_name]
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout.read()
return output.strip()
try:
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
return output.strip()
finally:
reap_children()
def get_pydoc_html(module):
"Returns pydoc generated output as html"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment