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
b86c4e44
Commit
b86c4e44
authored
Aug 11, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second attempt at fixing test__socket_dns: use a different host.
parent
da1b41af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
greentest/test__socket.py
greentest/test__socket.py
+3
-0
greentest/test__socket_dns.py
greentest/test__socket_dns.py
+7
-8
No files found.
greentest/test__socket.py
View file @
b86c4e44
...
@@ -222,6 +222,7 @@ class TestCreateConnection(greentest.TestCase):
...
@@ -222,6 +222,7 @@ class TestCreateConnection(greentest.TestCase):
else
:
else
:
raise
AssertionError
(
'create_connection did not raise socket.error as expected'
)
raise
AssertionError
(
'create_connection did not raise socket.error as expected'
)
class
TestFunctions
(
greentest
.
TestCase
):
class
TestFunctions
(
greentest
.
TestCase
):
def
test_wait_timeout
(
self
):
def
test_wait_timeout
(
self
):
...
@@ -229,9 +230,11 @@ class TestFunctions(greentest.TestCase):
...
@@ -229,9 +230,11 @@ class TestFunctions(greentest.TestCase):
import
gevent.socket
import
gevent.socket
import
gevent._socketcommon
import
gevent._socketcommon
orig_get_hub
=
gevent
.
socket
.
get_hub
orig_get_hub
=
gevent
.
socket
.
get_hub
class
get_hub
(
object
):
class
get_hub
(
object
):
def
wait
(
self
,
io
):
def
wait
(
self
,
io
):
gevent
.
sleep
(
10
)
gevent
.
sleep
(
10
)
class
io
(
object
):
class
io
(
object
):
callback
=
None
callback
=
None
...
...
greentest/test__socket_dns.py
View file @
b86c4e44
...
@@ -318,15 +318,14 @@ for ip, host in re.findall(r'^\s*(\d+\.\d+\.\d+\.\d+)\s+([^\s]+)', etc_hosts, re
...
@@ -318,15 +318,14 @@ for ip, host in re.findall(r'^\s*(\d+\.\d+\.\d+\.\d+)\s+([^\s]+)', etc_hosts, re
class TestGeventOrg(TestCase):
class TestGeventOrg(TestCase):
pass
def _normalize_result(self, result):
# For this test to work correctly, it needs to resolve to
if isinstance(result, (list, tuple)):
# an address with a single A record; round-robin DNS and multiple A records
# Attempt to account for round-robin DNS responses
# may mess it up (subsequent requests---and we always make two---may return
# that return the same results in different orders
# unequal results). We used to use gevent.org, but that now has multiple A records;
result = sorted(result)
# trying www.gevent.org which is a CNAME to readthedocs.org.
return result
add(TestGeventOrg, '
www
.
gevent
.
org
')
add(TestGeventOrg, '
gevent
.
org
')
class TestFamily(TestCase):
class TestFamily(TestCase):
...
...
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