mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
merge from 3.1
This commit is contained in:
commit
b17abb1af9
4 changed files with 31 additions and 5 deletions
|
@ -175,6 +175,16 @@ class urlopen_HttpTests(unittest.TestCase):
|
|||
finally:
|
||||
self.unfakehttp()
|
||||
|
||||
def test_url_fragment(self):
|
||||
# Issue #11703: geturl() omits fragments in the original URL.
|
||||
url = 'http://docs.python.org/library/urllib.html#OK'
|
||||
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
|
||||
try:
|
||||
fp = urllib.request.urlopen(url)
|
||||
self.assertEqual(fp.geturl(), url)
|
||||
finally:
|
||||
self.unfakehttp()
|
||||
|
||||
def test_willclose(self):
|
||||
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue