Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
27b0f854
Commit
27b0f854
authored
Jan 10, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__socket_dns.py: accomodate thread resolver
parent
d79a1465
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
greentest/test__socket_dns.py
greentest/test__socket_dns.py
+8
-4
No files found.
greentest/test__socket_dns.py
View file @
27b0f854
...
...
@@ -14,8 +14,9 @@ import gevent.socket as gevent_socket
RAISE_TOO_SLOW
=
False
# also test: '<broadcast>'
accept_results
=
[
resolver
=
gevent
.
get_hub
().
resolver
if
hasattr
(
resolver
,
'ares'
):
accept_results
=
[
# Python's socketmodule.c randomly chooses between gaierror and herror when raising an exception
# There are also a number of error code that are mapped to ARES_ENOTFOUND
...
...
@@ -64,8 +65,11 @@ accept_results = [
# don't care enough about it to fix it
(
"('kremlin.ru', 'www')"
,
"UnicodeEncodeError('ascii', u'
\
u043f
\
u0440
\
u0435
\
u0437
\
u0438
\
u0434
\
u0435
\
u043d
\
u0442
.
\
u0440
\
u0444
', 0, 9, 'ordinal not in range(128)')"
,
'getnameinfo'
)
]
'getnameinfo'
)]
else
:
accept_results
=
[(
"gaierror(-5, 'No address associated with hostname')"
,
"gaierror(-2, 'Name or service not known')"
)]
assert
gevent_socket
.
gaierror
is
socket
.
gaierror
...
...
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