Back to index

python3.2  3.2.2
Public Member Functions
test.test_deque.TestVariousIteratorArgs Class Reference

List of all members.

Public Member Functions

def test_constructor
def test_iter_with_altered_data
def test_runtime_error_on_empty_deque

Detailed Description

Definition at line 521 of file test_deque.py.


Member Function Documentation

Definition at line 523 of file test_deque.py.

00523 
00524     def test_constructor(self):
00525         for s in ("123", "", range(1000), ('do', 1.2), range(2000,2200,5)):
00526             for g in (seq_tests.Sequence, seq_tests.IterFunc,
00527                       seq_tests.IterGen, seq_tests.IterFuncStop,
00528                       seq_tests.itermulti, seq_tests.iterfunc):
00529                 self.assertEqual(list(deque(g(s))), list(g(s)))
00530             self.assertRaises(TypeError, deque, seq_tests.IterNextOnly(s))
00531             self.assertRaises(TypeError, deque, seq_tests.IterNoNext(s))
00532             self.assertRaises(ZeroDivisionError, deque, seq_tests.IterGenExc(s))

Here is the call graph for this function:

Definition at line 533 of file test_deque.py.

00533 
00534     def test_iter_with_altered_data(self):
00535         d = deque('abcdefg')
00536         it = iter(d)
00537         d.pop()
00538         self.assertRaises(RuntimeError, next, it)

Here is the call graph for this function:

Definition at line 539 of file test_deque.py.

00539 
00540     def test_runtime_error_on_empty_deque(self):
00541         d = deque()
00542         it = iter(d)
00543         d.append(10)
00544         self.assertRaises(RuntimeError, next, it)

Here is the call graph for this function:


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