Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_socket.SocketPairTest Class Reference
Inheritance diagram for test.test_socket.SocketPairTest:
Inheritance graph
[legend]
Collaboration diagram for test.test_socket.SocketPairTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def setUp
def tearDown
def clientSetUp
def clientTearDown
def serverExplicitReady
def clientRun

Public Attributes

 cli
 serv
 setUp
 tearDown
 server_ready
 client_ready
 done
 queue
 client_thread

Detailed Description

Definition at line 238 of file test_socket.py.


Constructor & Destructor Documentation

def test.test_socket.SocketPairTest.__init__ (   self,
  methodName = 'runTest' 
)

Reimplemented in test.test_socket.BasicSocketPairTest.

Definition at line 240 of file test_socket.py.

00240 
00241     def __init__(self, methodName='runTest'):
00242         unittest.TestCase.__init__(self, methodName=methodName)
00243         ThreadableTest.__init__(self)

Here is the caller graph for this function:


Member Function Documentation

def test.test_socket.ThreadableTest.clientRun (   self,
  test_func 
) [inherited]

Definition at line 157 of file test_socket.py.

00157 
00158     def clientRun(self, test_func):
00159         self.server_ready.wait()
00160         self.client_ready.set()
00161         self.clientSetUp()
00162         if not hasattr(test_func, '__call__'):
00163             raise TypeError("test_func must be a callable function")
00164         try:
00165             test_func()
00166         except BaseException as e:
00167             self.queue.put(e)
00168         finally:
00169             self.clientTearDown()

Here is the call graph for this function:

Reimplemented from test.test_socket.ThreadableTest.

Definition at line 251 of file test_socket.py.

00251 
00252     def clientSetUp(self):
00253         pass

Reimplemented from test.test_socket.ThreadableTest.

Definition at line 254 of file test_socket.py.

00254 
00255     def clientTearDown(self):
00256         self.cli.close()
00257         self.cli = None
00258         ThreadableTest.clientTearDown(self)
00259 

This method allows the server to explicitly indicate that
it wants the client thread to proceed. This is useful if the
server is about to execute a blocking routine that is
dependent upon the client thread during its setup routine.

Definition at line 123 of file test_socket.py.

00123 
00124     def serverExplicitReady(self):
00125         """This method allows the server to explicitly indicate that
00126         it wants the client thread to proceed. This is useful if the
00127         server is about to execute a blocking routine that is
00128         dependent upon the client thread during its setup routine."""
00129         self.server_ready.set()

Here is the caller graph for this function:

Definition at line 244 of file test_socket.py.

00244 
00245     def setUp(self):
00246         self.serv, self.cli = socket.socketpair()

Here is the caller graph for this function:

Definition at line 247 of file test_socket.py.

00247 
00248     def tearDown(self):
00249         self.serv.close()
00250         self.serv = None

Here is the caller graph for this function:


Member Data Documentation

Definition at line 245 of file test_socket.py.

Definition at line 132 of file test_socket.py.

Definition at line 141 of file test_socket.py.

Definition at line 133 of file test_socket.py.

Definition at line 134 of file test_socket.py.

Definition at line 249 of file test_socket.py.

Definition at line 131 of file test_socket.py.

Definition at line 120 of file test_socket.py.

Definition at line 121 of file test_socket.py.


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