Back to index

python3.2  3.2.2
Public Member Functions
test.test_getargs2.Tuple_TestCase Class Reference

List of all members.

Public Member Functions

def test_tuple

Detailed Description

Definition at line 218 of file test_getargs2.py.


Member Function Documentation

Definition at line 219 of file test_getargs2.py.

00219 
00220     def test_tuple(self):
00221         from _testcapi import getargs_tuple
00222 
00223         ret = getargs_tuple(1, (2, 3))
00224         self.assertEqual(ret, (1,2,3))
00225 
00226         # make sure invalid tuple arguments are handled correctly
00227         class seq:
00228             def __len__(self):
00229                 return 2
00230             def __getitem__(self, n):
00231                 raise ValueError
00232         self.assertRaises(TypeError, getargs_tuple, 1, seq())

Here is the call graph for this function:


The documentation for this class was generated from the following file: