]> granicus.if.org Git - python/commitdiff
Guess what? --disable-unicode proofing.
authorMichael W. Hudson <mwh@python.net>
Mon, 20 May 2002 14:54:17 +0000 (14:54 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 20 May 2002 14:54:17 +0000 (14:54 +0000)
This is a strange test.

Lib/test/test_getargs.py

index ed6e4eebf3a807f26f1a7df763092bb0300dd874..ff0d36cf57acbd75b66f2fff0bac7bb7b21b93aa 100644 (file)
@@ -14,8 +14,11 @@ single case that failed between 2.1 and 2.2a2.
 # XXX If the encoding succeeds using the current default encoding,
 # this test will fail because it does not test the right part of the
 # PyArg_ParseTuple() implementation.
+from test_support import have_unicode
 import marshal
-try:
-    marshal.loads(u"\222")
-except UnicodeError:
-    pass
+
+if have_unicode:
+    try:
+        marshal.loads(unicode(r"\222", 'unicode-escape'))
+    except UnicodeError:
+        pass