Back to index

python3.2  3.2.2
Public Member Functions
test.test_set.TestExceptionPropagation Class Reference

List of all members.

Public Member Functions

def test_instanceWithException
def test_instancesWithoutException
def test_changingSizeWhileIterating

Detailed Description

SF 628246:  Set constructor should not trap iterator TypeErrors

Definition at line 933 of file test_set.py.


Member Function Documentation

Definition at line 948 of file test_set.py.

00948 
00949     def test_changingSizeWhileIterating(self):
00950         s = set([1,2,3])
00951         try:
00952             for i in s:
00953                 s.update([4])
00954         except RuntimeError:
00955             pass
00956         else:
00957             self.fail("no exception when changing size during iteration")
00958 
00959 #==============================================================================

Here is the call graph for this function:

Definition at line 939 of file test_set.py.

00939 
00940     def test_instancesWithoutException(self):
00941         # All of these iterables should load without exception.
00942         set([1,2,3])
00943         set((1,2,3))
00944         set({'one':1, 'two':2, 'three':3})
00945         set(range(3))
00946         set('abc')
00947         set(gooditer())

Here is the call graph for this function:

Definition at line 936 of file test_set.py.

00936 
00937     def test_instanceWithException(self):
00938         self.assertRaises(TypeError, set, baditer())

Here is the call graph for this function:


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