blob: ed6e4eebf3a807f26f1a7df763092bb0300dd874 [file] [log] [blame]
Jeremy Hyltonf6491952001-09-10 01:57:12 +00001"""Test the internal getargs.c implementation
2
3 PyArg_ParseTuple() is defined here.
4
5The test here is not intended to test all of the module, just the
6single case that failed between 2.1 and 2.2a2.
7"""
8
9# marshal.loads() uses PyArg_ParseTuple(args, "s#:loads")
10# The s code will cause a Unicode conversion to occur. This test
11# verify that the error is propagated properly from the C code back to
12# Python.
13
14# XXX If the encoding succeeds using the current default encoding,
15# this test will fail because it does not test the right part of the
16# PyArg_ParseTuple() implementation.
17import marshal
18try:
19 marshal.loads(u"\222")
20except UnicodeError:
21 pass