Skip to content

Commit ffe45d6

Browse files
bnavigatorgruns
authored andcommitted
urllib changed behavior in Py 3.9
1 parent c3029ac commit ffe45d6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/test_furl.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import warnings
1616
from abc import ABCMeta, abstractmethod
17+
import sys
1718

1819
import six
1920
from six.moves import zip
@@ -2063,9 +2064,13 @@ def test_join(self):
20632064
assert f.url == 'http://pepp.ru/a/b/c#uwantpump?'
20642065

20652066
# In edge cases (e.g. URLs without an authority/netloc), behave
2066-
# identically to urllib.parse.urljoin().
2067+
# identically to urllib.parse.urljoin(), which changed behavior
2068+
# in Python 3.9
20672069
f = furl.furl('wss://slrp.com/').join('foo:1')
2068-
assert f.url == 'wss://slrp.com/foo:1'
2070+
if sys.version_info[:2] < (3, 9):
2071+
assert f.url == 'wss://slrp.com/foo:1'
2072+
else:
2073+
assert f.url == 'foo:1'
20692074
f = furl.furl('wss://slrp.com/').join('foo:1:rip')
20702075
assert f.url == 'foo:1:rip'
20712076
f = furl.furl('scheme:path').join('foo:blah')

0 commit comments

Comments
 (0)