Back to index

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

List of all members.

Public Member Functions

def test_lock
def test_rlock
def test_lock_context
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 = ('processes', 'manager', 'threads')

Detailed Description

Definition at line 565 of file

Member Function Documentation

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

Definition at line 124 of file

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

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

Definition at line 114 of file

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,
) [inherited]

Definition at line 110 of file

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 567 of file

00568     def test_lock(self):
00569         lock = self.Lock()
00570         self.assertEqual(lock.acquire(), True)
00571         self.assertEqual(lock.acquire(False), False)
00572         self.assertEqual(lock.release(), None)
00573         self.assertRaises((ValueError, threading.ThreadError), lock.release)

Here is the call graph for this function:

Definition at line 584 of file

00585     def test_lock_context(self):
00586         with self.Lock():
00587             pass

Definition at line 574 of file

00575     def test_rlock(self):
00576         lock = self.RLock()
00577         self.assertEqual(lock.acquire(), True)
00578         self.assertEqual(lock.acquire(), True)
00579         self.assertEqual(lock.acquire(), True)
00580         self.assertEqual(lock.release(), None)
00581         self.assertEqual(lock.release(), None)
00582         self.assertEqual(lock.release(), None)
00583         self.assertRaises((AssertionError, RuntimeError), lock.release)

Here is the call graph for this function:

Member Data Documentation

tuple test.test_multiprocessing.BaseTestCase.ALLOWED_TYPES = ('processes', 'manager', 'threads') [static, inherited]

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: