summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_getargs.py
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-05-20 14:54:17 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-05-20 14:54:17 (GMT)
commit7b7ba540332b9a62be622035dc69b2a332ce6c68 (patch)
treecd7f95011a442d2bdf290d2921e98ed871fa68c8 /Lib/test/test_getargs.py
parentf2072771674dcb71b03bd49e4c387d7986b13ca5 (diff)
downloadcpython-7b7ba540332b9a62be622035dc69b2a332ce6c68.zip
cpython-7b7ba540332b9a62be622035dc69b2a332ce6c68.tar.gz
cpython-7b7ba540332b9a62be622035dc69b2a332ce6c68.tar.bz2
Guess what? --disable-unicode proofing.
This is a strange test.
Diffstat (limited to 'Lib/test/test_getargs.py')
-rw-r--r--Lib/test/test_getargs.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/test_getargs.py b/Lib/test/test_getargs.py
index ed6e4ee..ff0d36c 100644
--- a/Lib/test/test_getargs.py
+++ b/Lib/test/test_getargs.py
@@ -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