Kaydet (Commit) f520c054 authored tarafından Guido van Rossum's avatar Guido van Rossum

Don't use cwnon-ASCII characters in the source; use \ooo escapes.

(This doesn't fix test_cookielib, just removes the SyntaxError.)
üst 13d7799f
# -*- coding: utf-8 -*-
"""Tests for cookielib.py."""
import re, os, time
......@@ -1530,13 +1529,13 @@ class LWPCookieTests(TestCase):
"foo = bar; version = 1")
cookie = interact_2965(
c, "http://www.acme.com/foo%2f%25/<<%0anew/",
c, "http://www.acme.com/foo%2f%25/<<%0anew\345/\346\370\345",
'bar=baz; path="/foo/"; version=1');
version_re = re.compile(r'^\$version=\"?1\"?', re.I)
self.assert_("foo=bar" in cookie and version_re.search(cookie))
cookie = interact_2965(
c, "http://www.acme.com/foo/%25/<<%0anew/")
c, "http://www.acme.com/foo/%25/<<%0anew\345/\346\370\345")
self.assert_(not cookie)
# unicode URL doesn't raise exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment