Check handling of invalid schemes.
(self, bytes, parse, scheme)
| 1038 | @support.subTests('parse', (urllib.parse.urlsplit, urllib.parse.urlparse)) |
| 1039 | @support.subTests('scheme', (".", "+", "-", "0", "http&", "६http")) |
| 1040 | def test_attributes_bad_scheme(self, bytes, parse, scheme): |
| 1041 | """Check handling of invalid schemes.""" |
| 1042 | url = scheme + "://www.example.net" |
| 1043 | if bytes: |
| 1044 | if not url.isascii(): |
| 1045 | self.skipTest('non-ASCII bytes') |
| 1046 | url = url.encode("ascii") |
| 1047 | p = parse(url, missing_as_none=True) |
| 1048 | self.assertIsNone(p.scheme) |
| 1049 | |
| 1050 | @support.subTests('missing_as_none', (False, True)) |
| 1051 | def test_attributes_without_netloc(self, missing_as_none): |
nothing calls this directly
no test coverage detected