Skip to content

Commit 0c1cd4b

Browse files
committed
Fix CookieTests following fix for CPython #130631
The fix for python/cpython#130631 in Python 3.14.0b1 (also cherry-picked to 3.13, but not yet released) causes `www.acme.com` to be unquoted in cookie strings. Adjust a test to cope with this.
1 parent 9f7e3bb commit 0c1cd4b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_cookies.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,13 @@ def test_missing_name(self):
332332
cookie = c._cookies["www.acme.com"]['/foo/']['"spam"']
333333
assert cookie.name == '"spam"'
334334
assert cookie.value is None
335-
assert lwp_cookie_str(cookie) == (
335+
assert lwp_cookie_str(cookie) in (
336+
r'"spam"; path="/foo/"; domain=www.acme.com; '
337+
'path_spec; discard; version=0',
338+
# prior to fix for https://github.com/python/cpython/issues/130631:
336339
r'"spam"; path="/foo/"; domain="www.acme.com"; '
337-
'path_spec; discard; version=0')
340+
'path_spec; discard; version=0',
341+
)
338342
old_str = repr(c)
339343
c.save(ignore_expires=True, ignore_discard=True)
340344
try:

0 commit comments

Comments
 (0)