Skip to content

Commit 01809a9

Browse files
Relax assertion
1 parent bffbd32 commit 01809a9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Lib/test/test_urlparse.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,10 +1995,6 @@ def test_to_bytes_deprecation(self):
19951995
'urllib.parse.to_bytes() is deprecated as of 3.8')
19961996

19971997
def test_falsey_deprecation(self):
1998-
pattern = (
1999-
"Providing false values other than strings or bytes to urllib.parse "
2000-
"is deprecated: got <class "
2001-
)
20021998
cases = [
20031999
(urllib.parse.urljoin, ['http://www.python.org', []]),
20042000
(urllib.parse.urljoin, [[], b'docs']),
@@ -2011,8 +2007,8 @@ def test_falsey_deprecation(self):
20112007
(urllib.parse.urlunsplit, [['http', 0, '', '', '']]),
20122008
]
20132009
for callable, args in cases:
2014-
with self.subTest(callable=callable):
2015-
with self.assertWarnsRegex(DeprecationWarning, pattern):
2010+
with self.subTest(callable=callable.__name__, args=args):
2011+
with self.assertWarnsRegex(DeprecationWarning, "false values"):
20162012
callable(*args)
20172013

20182014

0 commit comments

Comments
 (0)