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
67677575
Commit
67677575
authored
Feb 13, 2015
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #23418: Add missing entries to http.server.__all__.
Patch by Martin Panter.
parents
2eab85b7
366c570d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
Lib/http/server.py
Lib/http/server.py
+4
-1
Lib/test/test_httpservers.py
Lib/test/test_httpservers.py
+14
-0
No files found.
Lib/http/server.py
View file @
67677575
...
...
@@ -82,7 +82,10 @@ XXX To do:
__version__
=
"0.6"
__all__
=
[
"HTTPServer"
,
"BaseHTTPRequestHandler"
]
__all__
=
[
"HTTPServer"
,
"BaseHTTPRequestHandler"
,
"SimpleHTTPRequestHandler"
,
"CGIHTTPRequestHandler"
,
]
import
html
import
http.client
...
...
Lib/test/test_httpservers.py
View file @
67677575
...
...
@@ -760,6 +760,19 @@ class SimpleHTTPRequestHandlerTestCase(unittest.TestCase):
self
.
assertEqual
(
path
,
self
.
translated
)
class
MiscTestCase
(
unittest
.
TestCase
):
def
test_all
(
self
):
expected
=
[]
blacklist
=
{
'executable'
,
'nobody_uid'
,
'test'
}
for
name
in
dir
(
server
):
if
name
.
startswith
(
'_'
)
or
name
in
blacklist
:
continue
module_object
=
getattr
(
server
,
name
)
if
getattr
(
module_object
,
'__module__'
,
None
)
==
'http.server'
:
expected
.
append
(
name
)
self
.
assertCountEqual
(
server
.
__all__
,
expected
)
def
test_main
(
verbose
=
None
):
cwd
=
os
.
getcwd
()
try
:
...
...
@@ -769,6 +782,7 @@ def test_main(verbose=None):
SimpleHTTPServerTestCase
,
CGIHTTPServerTestCase
,
SimpleHTTPRequestHandlerTestCase
,
MiscTestCase
,
)
finally
:
os
.
chdir
(
cwd
)
...
...
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