diff options
| author | Skip Montanaro <skip@pobox.com> | 2011-03-19 14:15:28 (GMT) |
|---|---|---|
| committer | Skip Montanaro <skip@pobox.com> | 2011-03-19 14:15:28 (GMT) |
| commit | b61efd0a68a392e22e5f4a46e03b250977e6236b (patch) | |
| tree | b98bee40cb949aca3c50392d72d9858487dbb890 /Lib/test/test_urllib.py | |
| parent | b40dea7499281b288f513fdbe17dad198eb21ffe (diff) | |
| parent | a4d5b0cb620d8dfc07623f4fe2b551257217589d (diff) | |
| download | cpython-b61efd0a68a392e22e5f4a46e03b250977e6236b.zip cpython-b61efd0a68a392e22e5f4a46e03b250977e6236b.tar.gz cpython-b61efd0a68a392e22e5f4a46e03b250977e6236b.tar.bz2 | |
commit merge
Diffstat (limited to 'Lib/test/test_urllib.py')
| -rw-r--r-- | Lib/test/test_urllib.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index e148c62..d510e49 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -91,7 +91,7 @@ class urlopen_FileTests(unittest.TestCase): "did not return the expected text") def test_close(self): - # Test close() by calling it hear and then having it be called again + # Test close() by calling it here and then having it be called again # by the tearDown() method for the test self.returned_obj.close() @@ -174,6 +174,11 @@ class urlopen_HttpTests(unittest.TestCase): finally: self.unfakehttp() + def test_willclose(self): + self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!") + resp = urlopen("http://www.python.org") + self.assertTrue(resp.fp.will_close) + def test_read_0_9(self): # "0.9" response accepted (but not "simple responses" without # a status line) @@ -1021,7 +1026,7 @@ class URLopener_Tests(unittest.TestCase): # Just commented them out. # Can't really tell why keep failing in windows and sparc. -# Everywhere else they work ok, but on those machines, someteimes +# Everywhere else they work ok, but on those machines, sometimes # fail in one of the tests, sometimes in other. I have a linux, and # the tests go ok. # If anybody has one of the problematic enviroments, please help! |
