summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-05-09 15:50:25 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-05-09 15:50:25 (GMT)
commite3e61049a5e9af000d0532810e22d808940871e7 (patch)
treee624ad80050b12ad9b7e65855425f1f8367f8c2a /Lib/test/test_urllib2.py
parentc116b82b773fac82b1228775fc5bdabcac8562ad (diff)
downloadcpython-e3e61049a5e9af000d0532810e22d808940871e7.zip
cpython-e3e61049a5e9af000d0532810e22d808940871e7.tar.gz
cpython-e3e61049a5e9af000d0532810e22d808940871e7.tar.bz2
Trivial tests of urllib2 for recent SF bug
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r--Lib/test/test_urllib2.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
new file mode 100644
index 0000000..d2af276
--- /dev/null
+++ b/Lib/test/test_urllib2.py
@@ -0,0 +1,17 @@
+from test_support import verify
+import urllib2
+
+# A couple trivial tests
+
+try:
+ urllib2.urlopen('bogus url')
+except ValueError:
+ pass
+else:
+ verify(0)
+
+file_url = "file://%s" % urllib2.__file__
+f = urllib2.urlopen(file_url)
+buf = f.read()
+f.close()
+