Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f520c05

Browse files
committed
Don't use cwnon-ASCII characters in the source; use \ooo escapes.
(This doesn't fix test_cookielib, just removes the SyntaxError.)
1 parent 13d7799 commit f520c05

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/test/test_cookielib.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""Tests for cookielib.py."""
32

43
import re, os, time
@@ -1530,13 +1529,13 @@ def test_url_encoding(self):
15301529
"foo = bar; version = 1")
15311530

15321531
cookie = interact_2965(
1533-
c, "http://www.acme.com/foo%2f%25/<<%0anewå/æøå",
1532+
c, "http://www.acme.com/foo%2f%25/<<%0anew\345/\346\370\345",
15341533
'bar=baz; path="/foo/"; version=1');
15351534
version_re = re.compile(r'^\$version=\"?1\"?', re.I)
15361535
self.assert_("foo=bar" in cookie and version_re.search(cookie))
15371536

15381537
cookie = interact_2965(
1539-
c, "http://www.acme.com/foo/%25/<<%0anewå/æøå")
1538+
c, "http://www.acme.com/foo/%25/<<%0anew\345/\346\370\345")
15401539
self.assert_(not cookie)
15411540

15421541
# unicode URL doesn't raise exception

0 commit comments

Comments
 (0)