Back to index

python3.2  3.2.2
Public Member Functions
test.test_asynchat.TestFifo Class Reference

List of all members.

Public Member Functions

def test_basic
def test_given_list

Detailed Description

Definition at line 246 of file test_asynchat.py.


Member Function Documentation

Definition at line 247 of file test_asynchat.py.

00247 
00248     def test_basic(self):
00249         f = asynchat.fifo()
00250         f.push(7)
00251         f.push(b'a')
00252         self.assertEqual(len(f), 2)
00253         self.assertEqual(f.first(), 7)
00254         self.assertEqual(f.pop(), (1, 7))
00255         self.assertEqual(len(f), 1)
00256         self.assertEqual(f.first(), b'a')
00257         self.assertEqual(f.is_empty(), False)
00258         self.assertEqual(f.pop(), (1, b'a'))
00259         self.assertEqual(len(f), 0)
00260         self.assertEqual(f.is_empty(), True)
00261         self.assertEqual(f.pop(), (0, None))

Here is the call graph for this function:

Definition at line 262 of file test_asynchat.py.

00262 
00263     def test_given_list(self):
00264         f = asynchat.fifo([b'x', 17, 3])
00265         self.assertEqual(len(f), 3)
00266         self.assertEqual(f.pop(), (1, b'x'))
00267         self.assertEqual(f.pop(), (1, 17))
00268         self.assertEqual(f.pop(), (1, 3))
00269         self.assertEqual(f.pop(), (0, None))
00270 

Here is the call graph for this function:


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