Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a6e81a23
Commit
a6e81a23
authored
Jul 15, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_pydoc needs to cleanup after itself
parent
707f228b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
Lib/test/test_pydoc.py
Lib/test/test_pydoc.py
+16
-13
No files found.
Lib/test/test_pydoc.py
View file @
a6e81a23
...
...
@@ -15,8 +15,10 @@ import textwrap
from
io
import
StringIO
from
collections
import
namedtuple
from
contextlib
import
contextmanager
from
test.support
import
TESTFN
,
forget
,
rmtree
,
EnvironmentVarGuard
,
\
reap_children
,
captured_output
,
captured_stdout
,
unlink
from
test.support
import
(
TESTFN
,
forget
,
rmtree
,
EnvironmentVarGuard
,
reap_children
,
reap_threads
,
captured_output
,
captured_stdout
,
unlink
)
from
test
import
pydoc_mod
...
...
@@ -205,11 +207,8 @@ def run_pydoc(module_name, *args):
output of pydoc.
"""
cmd
=
[
sys
.
executable
,
pydoc
.
__file__
,
" "
.
join
(
args
),
module_name
]
try
:
output
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
).
communicate
()[
0
]
return
output
.
strip
()
finally
:
reap_children
()
output
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
).
communicate
()[
0
]
return
output
.
strip
()
def
get_pydoc_html
(
module
):
"Returns pydoc generated output as html"
...
...
@@ -488,13 +487,17 @@ class TestHelper(unittest.TestCase):
self
.
assertEqual
(
sorted
(
pydoc
.
Helper
.
keywords
),
sorted
(
keyword
.
kwlist
))
@
reap_threads
def
test_main
():
test
.
support
.
run_unittest
(
PydocDocTest
,
TestDescriptions
,
PydocServerTest
,
PydocUrlHandlerTest
,
TestHelper
,
)
try
:
test
.
support
.
run_unittest
(
PydocDocTest
,
TestDescriptions
,
PydocServerTest
,
PydocUrlHandlerTest
,
TestHelper
,
)
finally
:
reap_children
()
if
__name__
==
"__main__"
:
test_main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment