Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_iterlen.TestRepeat Class Reference

------- Concrete Type Tests ------- More...

Inheritance diagram for test.test_iterlen.TestRepeat:
Inheritance graph
[legend]
Collaboration diagram for test.test_iterlen.TestRepeat:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def test_no_len_for_infinite_repeat
def test_invariant

Public Attributes

 it

Detailed Description

------- Concrete Type Tests -------

Definition at line 90 of file test_iterlen.py.


Member Function Documentation

Definition at line 92 of file test_iterlen.py.

00092 
00093     def setUp(self):
00094         self.it = repeat(None, n)

Here is the caller graph for this function:

Definition at line 65 of file test_iterlen.py.

00065 
00066     def test_invariant(self):
00067         it = self.it
00068         for i in reversed(range(1, n+1)):
00069             self.assertEqual(len(it), i)
00070             next(it)
00071         self.assertEqual(len(it), 0)
00072         self.assertRaises(StopIteration, next, it)
00073         self.assertEqual(len(it), 0)

Here is the call graph for this function:

Definition at line 95 of file test_iterlen.py.

00095 
00096     def test_no_len_for_infinite_repeat(self):
00097         # The repeat() object can also be infinite
00098         self.assertRaises(TypeError, len, repeat(None))

Here is the call graph for this function:


Member Data Documentation

Definition at line 93 of file test_iterlen.py.


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