+++ /dev/null
-"""\r
-Test the internal getargs.c implementation\r
-\r
- PyArg_ParseTuple() is defined here.\r
-\r
-The test here is not intended to test all of the module, just the\r
-single case that failed between 2.1 and 2.2a2.\r
-"""\r
-\r
-# marshal.loads() uses PyArg_ParseTuple(args, "s#:loads")\r
-# The s code will cause a Unicode conversion to occur. This test\r
-# verify that the error is propagated properly from the C code back to\r
-# Python.\r
-\r
-import marshal\r
-import unittest\r
-from test import test_support\r
-\r
-class GetArgsTest(unittest.TestCase):\r
- # If the encoding succeeds using the current default encoding,\r
- # this test will fail because it does not test the right part of the\r
- # PyArg_ParseTuple() implementation.\r
- def test_with_marshal(self):\r
- arg = unicode(r'\222', 'unicode-escape')\r
- self.assertRaises(UnicodeError, marshal.loads, arg)\r
-\r
-def test_main():\r
- test_support.run_unittest(GetArgsTest)\r
-\r
-if __name__ == '__main__':\r
- test_main()\r