Back to index

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

List of all members.

Public Member Functions

def setUp
def assertInWithManagerInvariants
def assertAfterWithManagerInvariants
def assertAfterWithManagerInvariantsNoError
def assertInWithGeneratorInvariants
def assertAfterWithGeneratorInvariantsNoError
def raiseTestException
def assertAfterWithManagerInvariantsWithError
def assertAfterWithGeneratorInvariantsWithError

Public Attributes

 TEST_EXCEPTION
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 188 of file test_with.py.


Member Function Documentation

Definition at line 211 of file test_with.py.

00211 
00212     def assertAfterWithGeneratorInvariantsNoError(self, mock_generator):
00213         self.assertTrue(mock_generator.yielded)
00214         self.assertTrue(mock_generator.stopped)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 230 of file test_with.py.

00230 
00231     def assertAfterWithGeneratorInvariantsWithError(self, mock_generator):
00232         self.assertTrue(mock_generator.yielded)
00233         self.assertTrue(mock_generator.stopped)
00234 

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_with.ContextmanagerAssertionMixin.assertAfterWithManagerInvariants (   self,
  mock_manager,
  exit_args 
)

Definition at line 198 of file test_with.py.

00198 
00199     def assertAfterWithManagerInvariants(self, mock_manager, exit_args):
00200         self.assertTrue(mock_manager.enter_called)
00201         self.assertTrue(mock_manager.exit_called)
00202         self.assertEqual(mock_manager.exit_args, exit_args)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 203 of file test_with.py.

00203 
00204     def assertAfterWithManagerInvariantsNoError(self, mock_manager):
00205         self.assertAfterWithManagerInvariants(mock_manager,
00206             (None, None, None))

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_with.ContextmanagerAssertionMixin.assertAfterWithManagerInvariantsWithError (   self,
  mock_manager,
  exc_type = None 
)

Definition at line 219 of file test_with.py.

00219 
00220                                                   exc_type=None):
00221         self.assertTrue(mock_manager.enter_called)
00222         self.assertTrue(mock_manager.exit_called)
00223         if exc_type is None:
00224             self.assertEqual(mock_manager.exit_args[1], self.TEST_EXCEPTION)
00225             exc_type = type(self.TEST_EXCEPTION)
00226         self.assertEqual(mock_manager.exit_args[0], exc_type)
00227         # Test the __exit__ arguments. Issue #7853
00228         self.assertIsInstance(mock_manager.exit_args[1], exc_type)
00229         self.assertIsNot(mock_manager.exit_args[2], None)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 207 of file test_with.py.

00207 
00208     def assertInWithGeneratorInvariants(self, mock_generator):
00209         self.assertTrue(mock_generator.yielded)
00210         self.assertFalse(mock_generator.stopped)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 193 of file test_with.py.

00193 
00194     def assertInWithManagerInvariants(self, mock_manager):
00195         self.assertTrue(mock_manager.enter_called)
00196         self.assertFalse(mock_manager.exit_called)
00197         self.assertEqual(mock_manager.exit_args, None)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 215 of file test_with.py.

00215 
00216     def raiseTestException(self):
00217         raise self.TEST_EXCEPTION

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 190 of file test_with.py.

00190 
00191     def setUp(self):
00192         self.TEST_EXCEPTION = RuntimeError("test exception")

Here is the caller graph for this function:


Member Data Documentation

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 191 of file test_with.py.


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