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
fbadabde
Commit
fbadabde
authored
Oct 17, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment out failing assertion; tests are unlikely to change anyway.
parent
5f7a87e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
gevent/_socket2.py
gevent/_socket2.py
+3
-1
greentest/2.6/test_urllib2net.py
greentest/2.6/test_urllib2net.py
+2
-2
greentest/2.7pypy/test_urllib2net.py
greentest/2.7pypy/test_urllib2net.py
+2
-2
No files found.
gevent/_socket2.py
View file @
fbadabde
...
...
@@ -38,7 +38,9 @@ else:
#_fileobject.__enter__ = lambda self: self
#_fileobject.__exit__ = lambda self, *args: self.close() if not self.closed else None
# or we could subclass. subclassing has the benefit of not
# changing the behaviour of the stdlib if we're just imported
# changing the behaviour of the stdlib if we're just imported; OTOH,
# under Python 2.6, test_urllib2net.py asserts that the class IS
# socket._fileobject (sigh), so we have to work around that.
class
_fileobject
(
_fileobject
):
def
__enter__
(
self
):
...
...
greentest/2.6/test_urllib2net.py
View file @
fbadabde
...
...
@@ -83,11 +83,11 @@ class CloseSocketTest(unittest.TestCase):
# delve deep into response to fetch socket._socketobject
response
=
_urlopen_with_retry
(
"http://www.python.org/"
)
abused_fileobject
=
response
.
fp
self
.
assert_
(
abused_fileobject
.
__class__
is
socket
.
_fileobject
)
#self.assert_(abused_fileobject.__class__ is socket._fileobject) JAM: gevent: disable
httpresponse
=
abused_fileobject
.
_sock
self
.
assert_
(
httpresponse
.
__class__
is
httplib
.
HTTPResponse
)
fileobject
=
httpresponse
.
fp
self
.
assert_
(
fileobject
.
__class__
is
socket
.
_fileobject
)
#self.assert_(fileobject.__class__ is socket._fileobject) JAM: gevent: disable
self
.
assert_
(
not
fileobject
.
closed
)
response
.
close
()
...
...
greentest/2.7pypy/test_urllib2net.py
View file @
fbadabde
...
...
@@ -80,11 +80,11 @@ class CloseSocketTest(unittest.TestCase):
# delve deep into response to fetch socket._socketobject
response
=
_urlopen_with_retry
(
"http://www.example.com/"
)
abused_fileobject
=
response
.
fp
self
.
assertIs
(
abused_fileobject
.
__class__
,
socket
.
_fileobject
)
#self.assertIs(abused_fileobject.__class__, socket._fileobject) JAM gevent: disable
httpresponse
=
abused_fileobject
.
_sock
self
.
assertIs
(
httpresponse
.
__class__
,
httplib
.
HTTPResponse
)
fileobject
=
httpresponse
.
fp
self
.
assertIs
(
fileobject
.
__class__
,
socket
.
_fileobject
)
#self.assertIs(fileobject.__class__, socket._fileobject) JAM gevent: disable
self
.
assertTrue
(
not
fileobject
.
closed
)
response
.
close
()
...
...
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