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
bdfeb038
Commit
bdfeb038
authored
Sep 20, 2014
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #22247: Add NNTPError to nntplib.__all__.
parents
257c6cb8
96756b6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
Lib/nntplib.py
Lib/nntplib.py
+2
-2
Lib/test/test_nntplib.py
Lib/test/test_nntplib.py
+12
-5
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/nntplib.py
View file @
bdfeb038
...
...
@@ -80,8 +80,8 @@ from email.header import decode_header as _email_decode_header
from
socket
import
_GLOBAL_DEFAULT_TIMEOUT
__all__
=
[
"NNTP"
,
"NNTP
ReplyError"
,
"NNTPTemporaryError"
,
"NNTPPermanent
Error"
,
"NNTPProtocolError"
,
"NNTPDataError"
,
"NNTP
Error"
,
"NNTPReplyError"
,
"NNTPTemporary
Error"
,
"NNTPP
ermanentError"
,
"NNTPP
rotocolError"
,
"NNTPDataError"
,
"decode_header"
,
]
...
...
Lib/test/test_nntplib.py
View file @
bdfeb038
...
...
@@ -1412,11 +1412,18 @@ class MiscTests(unittest.TestCase):
def
test_ssl_support
(
self
):
self
.
assertTrue
(
hasattr
(
nntplib
,
'NNTP_SSL'
))
def
test_main
():
tests
=
[
MiscTests
,
NNTPv1Tests
,
NNTPv2Tests
,
CapsAfterLoginNNTPv2Tests
,
SendReaderNNTPv2Tests
,
NetworkedNNTPTests
,
NetworkedNNTP_SSLTests
]
support
.
run_unittest
(
*
tests
)
class
PublicAPITests
(
unittest
.
TestCase
):
"""Ensures that the correct values are exposed in the public API."""
def
test_module_all_attribute
(
self
):
self
.
assertTrue
(
hasattr
(
nntplib
,
'__all__'
))
target_api
=
[
'NNTP'
,
'NNTPError'
,
'NNTPReplyError'
,
'NNTPTemporaryError'
,
'NNTPPermanentError'
,
'NNTPProtocolError'
,
'NNTPDataError'
,
'decode_header'
]
if
ssl
is
not
None
:
target_api
.
append
(
'NNTP_SSL'
)
self
.
assertEqual
(
set
(
nntplib
.
__all__
),
set
(
target_api
))
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Misc/NEWS
View file @
bdfeb038
...
...
@@ -137,6 +137,8 @@ Core and Builtins
Library
-------
-
Issue
#
22247
:
Add
NNTPError
to
nntplib
.
__all__
.
-
Issue
#
22366
:
urllib
.
request
.
urlopen
will
accept
a
context
object
(
SSLContext
)
as
an
argument
which
will
then
used
be
for
HTTPS
connection
.
Patch
by
Alex
Gaynor
.
...
...
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