Back to index

python3.2  3.2.2
Classes | Public Member Functions
test.test_select.SelectTestCase Class Reference

List of all members.

Classes

class  Almost
class  Nope

Public Member Functions

def test_error_conditions
def test_returned_list_identity
def test_select

Detailed Description

Definition at line 9 of file test_select.py.


Class Documentation

class test::test_select::SelectTestCase::Nope

Definition at line 11 of file test_select.py.


Member Function Documentation

Definition at line 18 of file test_select.py.

00018 
00019     def test_error_conditions(self):
00020         self.assertRaises(TypeError, select.select, 1, 2, 3)
00021         self.assertRaises(TypeError, select.select, [self.Nope()], [], [])
00022         self.assertRaises(TypeError, select.select, [self.Almost()], [], [])
00023         self.assertRaises(TypeError, select.select, [], [], [], "not a number")

Here is the call graph for this function:

Definition at line 24 of file test_select.py.

00024 
00025     def test_returned_list_identity(self):
00026         # See issue #8329
00027         r, w, x = select.select([], [], [], 1)
00028         self.assertIsNot(r, w)
00029         self.assertIsNot(r, x)
00030         self.assertIsNot(w, x)

Here is the call graph for this function:

Definition at line 31 of file test_select.py.

00031 
00032     def test_select(self):
00033         cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
00034         p = os.popen(cmd, 'r')
00035         for tout in (0, 1, 2, 4, 8, 16) + (None,)*10:
00036             if support.verbose:
00037                 print('timeout =', tout)
00038             rfd, wfd, xfd = select.select([p], [], [], tout)
00039             if (rfd, wfd, xfd) == ([], [], []):
00040                 continue
00041             if (rfd, wfd, xfd) == ([p], [], []):
00042                 line = p.readline()
00043                 if support.verbose:
00044                     print(repr(line))
00045                 if not line:
00046                     if support.verbose:
00047                         print('EOF')
00048                     break
00049                 continue
00050             self.fail('Unexpected return values from select():', rfd, wfd, xfd)
00051         p.close()

Here is the call graph for this function:


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