Stricter verification for file based url scheme and reliance on ftp protocol.
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 080daa4..4d117c7 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -731,6 +731,8 @@
("file://ftp.example.com///foo.txt", False),
# XXXX bug: fails with OSError, should be URLError
("file://ftp.example.com/foo.txt", False),
+ ("file://somehost//foo/something.txt", True),
+ ("file://localhost//foo/something.txt", False),
]:
req = Request(url)
try:
@@ -741,6 +743,7 @@
else:
self.assertTrue(o.req is req)
self.assertEqual(req.type, "ftp")
+ self.assertEqual(req.type is "ftp", ftp)
def test_http(self):