Back to index

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

List of all members.

Public Member Functions

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

Public Attributes

 cli
 serv
 port
 setUp
 tearDown
 server_ready
 client_ready
 done
 queue
 client_thread

Detailed Description

Definition at line 191 of file test_socket.py.


Constructor & Destructor Documentation

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

Reimplemented in test.test_socket.BasicUDPTest.

Definition at line 193 of file test_socket.py.

00193 
00194     def __init__(self, methodName='runTest'):
00195         SocketUDPTest.__init__(self, methodName=methodName)
00196         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 197 of file test_socket.py.

00197 
00198     def clientSetUp(self):
00199         self.cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

Reimplemented from test.test_socket.ThreadableTest.

Definition at line 200 of file test_socket.py.

00200 
00201     def clientTearDown(self):
00202         self.cli.close()
00203         self.cli = None
00204         ThreadableTest.clientTearDown(self)

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:

def test.test_socket.SocketUDPTest.setUp (   self) [inherited]

Definition at line 70 of file test_socket.py.

00070 
00071     def setUp(self):
00072         self.serv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
00073         self.port = support.bind_port(self.serv)

Here is the caller graph for this function:

def test.test_socket.SocketUDPTest.tearDown (   self) [inherited]

Definition at line 74 of file test_socket.py.

00074 
00075     def tearDown(self):
00076         self.serv.close()
00077         self.serv = None

Here is the caller graph for this function:


Member Data Documentation

Definition at line 198 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 72 of file test_socket.py.

Definition at line 134 of file test_socket.py.

Definition at line 71 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: