| 1 |
""" |
| 2 |
Test the internal getargs.c implementation |
| 3 |
|
| 4 |
PyArg_ParseTuple() is defined here. |
| 5 |
|
| 6 |
The test here is not intended to test all of the module, just the |
| 7 |
single case that failed between 2.1 and 2.2a2. |
| 8 |
""" |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
import marshal |
| 16 |
import unittest |
| 17 |
from test import test_support |
| 18 |
|
| 19 |
class GetArgsTest(unittest.TestCase): |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
def test_with_marshal(self): |
| 24 |
arg = unicode(r'\222', 'unicode-escape') |
| 25 |
self.assertRaises(UnicodeError, marshal.loads, arg) |
| 26 |
|
| 27 |
def test_main(): |
| 28 |
test_support.run_unittest(GetArgsTest) |
| 29 |
|
| 30 |
if __name__ == '__main__': |
| 31 |
test_main() |