0001 """Test the internal getargs.c implementation 0002 0003 PyArg_ParseTuple() is defined here. 0004 0005 The test here is not intended to test all of the module, just the 0006 single case that failed between 2.1 and 2.2a2. 0007 """ 0008 0009 # marshal.loads() uses PyArg_ParseTuple(args, "s#:loads") 0010 # The s code will cause a Unicode conversion to occur. This test 0011 # verify that the error is propagated properly from the C code back to 0012 # Python. 0013 0014 # XXX If the encoding succeeds using the current default encoding, 0015 # this test will fail because it does not test the right part of the 0016 # PyArg_ParseTuple() implementation. 0017 from test.test_support import have_unicode 0018 import marshal 0019 0020 if have_unicode: 0021 try: 0022 marshal.loads(unicode(r"\222", 'unicode-escape')) 0023 except UnicodeError: 0024 pass 0025
Generated by PyXR 0.9.4