Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
test.test_multiprocessing._TestRemoteManager Class Reference
Inheritance diagram for test.test_multiprocessing._TestRemoteManager:
Inheritance graph
[legend]
Collaboration diagram for test.test_multiprocessing._TestRemoteManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_remote
def assertTimingAlmostEqual
def assertReturnsIfImplemented
def __reduce__

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Public Attributes

tuple ALLOWED_TYPES = ('manager',)

Private Member Functions

def _putter

Detailed Description

Definition at line 1303 of file test_multiprocessing.py.


Member Function Documentation

def test.test_multiprocessing.BaseTestCase.__reduce__ (   self,
  args 
) [inherited]

Definition at line 124 of file test_multiprocessing.py.

00124 
00125     def __reduce__(self, *args):
00126         raise NotImplementedError("shouldn't try to pickle a test case")

def test.test_multiprocessing._TestRemoteManager._putter (   cls,
  address,
  authkey 
) [private]

Definition at line 1308 of file test_multiprocessing.py.

01308 
01309     def _putter(cls, address, authkey):
01310         manager = QueueManager2(
01311             address=address, authkey=authkey, serializer=SERIALIZER
01312             )
01313         manager.connect()
01314         queue = manager.get_queue()
01315         queue.put(('hello world', None, True, 2.25))

Here is the caller graph for this function:

def test.test_multiprocessing.BaseTestCase.assertReturnsIfImplemented (   self,
  value,
  func,
  args 
) [inherited]

Definition at line 114 of file test_multiprocessing.py.

00114 
00115     def assertReturnsIfImplemented(self, value, func, *args):
00116         try:
00117             res = func(*args)
00118         except NotImplementedError:
00119             pass
00120         else:
00121             return self.assertEqual(value, res)

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_multiprocessing.BaseTestCase.assertTimingAlmostEqual (   self,
  a,
  b 
) [inherited]

Definition at line 110 of file test_multiprocessing.py.

00110 
00111     def assertTimingAlmostEqual(self, a, b):
00112         if CHECK_TIMINGS:
00113             self.assertAlmostEqual(a, b, 1)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1316 of file test_multiprocessing.py.

01316 
01317     def test_remote(self):
01318         authkey = os.urandom(32)
01319 
01320         manager = QueueManager(
01321             address=('localhost', 0), authkey=authkey, serializer=SERIALIZER
01322             )
01323         manager.start()
01324 
01325         p = self.Process(target=self._putter, args=(manager.address, authkey))
01326         p.start()
01327 
01328         manager2 = QueueManager2(
01329             address=manager.address, authkey=authkey, serializer=SERIALIZER
01330             )
01331         manager2.connect()
01332         queue = manager2.get_queue()
01333 
01334         # Note that xmlrpclib will deserialize object as a list not a tuple
01335         self.assertEqual(queue.get(), ['hello world', None, True, 2.25])
01336 
01337         # Because we are using xmlrpclib for serialization instead of
01338         # pickle this will cause a serialization error.
01339         self.assertRaises(Exception, queue.put, time.sleep)
01340 
01341         # Make queue finalizer run before the server is stopped
01342         del queue
01343         manager.shutdown()

Here is the call graph for this function:


Member Data Documentation

Reimplemented from test.test_multiprocessing.BaseTestCase.

Definition at line 1305 of file test_multiprocessing.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


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