Back to index

python3.2  3.2.2
Public Member Functions
test.test_bigaddrspace.BytesTest Class Reference

List of all members.

Public Member Functions

def test_concat
def test_optimized_concat
def test_repeat

Detailed Description

Definition at line 19 of file test_bigaddrspace.py.


Member Function Documentation

Definition at line 22 of file test_bigaddrspace.py.

00022 
00023     def test_concat(self):
00024         # Allocate a bytestring that's near the maximum size allowed by
00025         # the address space, and then try to build a new, larger one through
00026         # concatenation.
00027         try:
00028             x = b"x" * (MAX_Py_ssize_t - 128)
00029             self.assertRaises(OverflowError, operator.add, x, b"x" * 128)
00030         finally:
00031             x = None

Here is the call graph for this function:

Definition at line 33 of file test_bigaddrspace.py.

00033 
00034     def test_optimized_concat(self):
00035         try:
00036             x = b"x" * (MAX_Py_ssize_t - 128)
00037 
00038             with self.assertRaises(OverflowError) as cm:
00039                 # this statement used a fast path in ceval.c
00040                 x = x + b"x" * 128
00041 
00042             with self.assertRaises(OverflowError) as cm:
00043                 # this statement used a fast path in ceval.c
00044                 x +=  b"x" * 128
00045         finally:
00046             x = None

Here is the call graph for this function:

Definition at line 48 of file test_bigaddrspace.py.

00048 
00049     def test_repeat(self):
00050         try:
00051             x = b"x" * (MAX_Py_ssize_t - 128)
00052             self.assertRaises(OverflowError, operator.mul, x, 128)
00053         finally:
00054             x = None
00055 

Here is the call graph for this function:


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