summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2007-08-03 21:03:02 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2007-08-03 21:03:02 (GMT)
commitec0c508b0ad5541a47eb77f4e7aa30a73596d681 (patch)
tree31fde7a6a244565a6a86447d4df7628277da5789 /Lib/test
parent8fff7924a4217dc73de2042168a0eda7243e26d7 (diff)
downloadcpython-ec0c508b0ad5541a47eb77f4e7aa30a73596d681.zip
cpython-ec0c508b0ad5541a47eb77f4e7aa30a73596d681.tar.gz
cpython-ec0c508b0ad5541a47eb77f4e7aa30a73596d681.tar.bz2
Fix an absurdly invasive test.
Checks that an io object somewhere in the stack of wrappers is actually closed. --This line, and those below, will be ignored-- M test_urllib2net.py
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_urllib2net.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index 17b5394..02d69cf 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -75,11 +75,9 @@ class CloseSocketTest(unittest.TestCase):
# delve deep into response to fetch socket._socketobject
response = urllib2.urlopen("http://www.python.org/")
abused_fileobject = response.fp
- self.assert_(abused_fileobject.__class__ is socket._fileobject)
- httpresponse = abused_fileobject._sock
+ httpresponse = abused_fileobject.raw
self.assert_(httpresponse.__class__ is httplib.HTTPResponse)
fileobject = httpresponse.fp
- self.assert_(fileobject.__class__ is socket._fileobject)
self.assert_(not fileobject.closed)
response.close()