Back to index

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

List of all members.

Public Member Functions

def test_mymanager
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',)

Detailed Description

Definition at line 1252 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.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 1256 of file test_multiprocessing.py.

01256 
01257     def test_mymanager(self):
01258         manager = MyManager()
01259         manager.start()
01260 
01261         foo = manager.Foo()
01262         bar = manager.Bar()
01263         baz = manager.baz()
01264 
01265         foo_methods = [name for name in ('f', 'g', '_h') if hasattr(foo, name)]
01266         bar_methods = [name for name in ('f', 'g', '_h') if hasattr(bar, name)]
01267 
01268         self.assertEqual(foo_methods, ['f', 'g'])
01269         self.assertEqual(bar_methods, ['f', '_h'])
01270 
01271         self.assertEqual(foo.f(), 'f()')
01272         self.assertRaises(ValueError, foo.g)
01273         self.assertEqual(foo._callmethod('f'), 'f()')
01274         self.assertRaises(RemoteError, foo._callmethod, '_h')
01275 
01276         self.assertEqual(bar.f(), 'f()')
01277         self.assertEqual(bar._h(), '_h()')
01278         self.assertEqual(bar._callmethod('f'), 'f()')
01279         self.assertEqual(bar._callmethod('_h'), '_h()')
01280 
01281         self.assertEqual(list(baz), [i*i for i in range(10)])
01282 
01283         manager.shutdown()
01284 
01285 #
01286 # Test of connecting to a remote server and using xmlrpclib for serialization
01287 #

Here is the call graph for this function:


Member Data Documentation

Reimplemented from test.test_multiprocessing.BaseTestCase.

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