[Python-checkins] cpython (3.2): Test pipes.quote with a few non-ASCII characters (see #9723).

eric.araujo python-checkins at python.org
Fri Aug 12 18:03:54 CEST 2011


http://hg.python.org/cpython/rev/8032ea4c3619
changeset: 71823:8032ea4c3619
branch: 3.2
parent: 71786:7ea5d9c858f1
user: Éric Araujo <merwok at netwok.org>
date: Tue Aug 09 23:03:43 2011 +0200
summary:
 Test pipes.quote with a few non-ASCII characters (see #9723).
That pipes.quote thinks all non-ASCII characters need to be quoted may
be a bug, but right now I’m committing this test to make sure I haven’t
introduced a behavior change in 3.3 when I simplified the code to use a
regex (in 5966eeb0457d).
files:
 Lib/test/test_pipes.py | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_pipes.py b/Lib/test/test_pipes.py
--- a/Lib/test/test_pipes.py
+++ b/Lib/test/test_pipes.py
@@ -81,7 +81,8 @@
 
 def testQuoting(self):
 safeunquoted = string.ascii_letters + string.digits + '@%_-+=:,./'
- unsafe = '"`$\\!'
+ unicode_sample = '\xe9\xe0\xdf' # e + acute accent, a + grave, sharp s
+ unsafe = '"`$\\!' + unicode_sample
 
 self.assertEqual(pipes.quote(''), "''")
 self.assertEqual(pipes.quote(safeunquoted), safeunquoted)
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /