(self)
| 183 | self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname) |
| 184 | |
| 185 | def test_remote_authority(self): |
| 186 | # Test for GH-90812. |
| 187 | url = 'file://pythontest.net/foo/bar' |
| 188 | with self.assertRaises(urllib.error.URLError) as e: |
| 189 | urllib.request.urlopen(url) |
| 190 | if os.name == 'nt': |
| 191 | self.assertEqual(e.exception.filename, r'\\pythontest.net\foo\bar') |
| 192 | else: |
| 193 | self.assertEqual(e.exception.reason, 'file:// scheme is supported only on localhost') |
| 194 | |
| 195 | |
| 196 | class ProxyTests(unittest.TestCase): |
nothing calls this directly
no test coverage detected