File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+).
Original file line number Diff line number Diff line change @@ -40,9 +40,19 @@ def test_scheme_only(self):
4040
4141 def test_no_scheme1 (self ):
4242 u = URL ("google.com:80" )
43- assert u .scheme == ""
44- assert u .host is None
45- assert u .path == "google.com:80"
43+ # See: https://bugs.python.org/issue27657
44+ if (
45+ sys .version_info [:3 ] == (3 , 7 , 6 )
46+ or sys .version_info [:3 ] == (3 , 8 , 1 )
47+ or sys .version_info >= (3 , 9 , 0 )
48+ ):
49+ assert u .scheme == "google.com"
50+ assert u .host is None
51+ assert u .path == "80"
52+ else :
53+ assert u .scheme == ""
54+ assert u .host is None
55+ assert u .path == "google.com:80"
4656 assert u .query_string == ""
4757 assert u .fragment == ""
4858
You can’t perform that action at this time.
0 commit comments