Back to index

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

List of all members.

Public Member Functions

def test_L
def test_K

Detailed Description

Definition at line 187 of file test_getargs2.py.


Member Function Documentation

Definition at line 204 of file test_getargs2.py.

00204 
00205     def test_K(self):
00206         from _testcapi import getargs_K
00207         # K return 'unsigned long long', no range checking
00208         self.assertRaises(TypeError, getargs_K, 3.14)
00209         self.assertRaises(TypeError, getargs_K, Int())
00210         self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX))
00211         self.assertEqual(0, getargs_K(0))
00212         self.assertEqual(0, getargs_K(ULLONG_MAX+1))
00213 
00214         self.assertEqual(42, getargs_K(42))
00215 
00216         self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
00217 

Here is the call graph for this function:

Definition at line 188 of file test_getargs2.py.

00188 
00189     def test_L(self):
00190         from _testcapi import getargs_L
00191         # L returns 'long long', and does range checking (LLONG_MIN
00192         # ... LLONG_MAX)
00193         self.assertRaises(TypeError, getargs_L, 3.14)
00194         self.assertRaises(TypeError, getargs_L, "Hello")
00195         self.assertEqual(99, getargs_L(Int()))
00196 
00197         self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1)
00198         self.assertEqual(LLONG_MIN, getargs_L(LLONG_MIN))
00199         self.assertEqual(LLONG_MAX, getargs_L(LLONG_MAX))
00200         self.assertRaises(OverflowError, getargs_L, LLONG_MAX+1)
00201 
00202         self.assertEqual(42, getargs_L(42))
00203         self.assertRaises(OverflowError, getargs_L, VERY_LARGE)

Here is the call graph for this function:


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