Package flumotion :: Package common :: Module testsuite :: Class TestCase
[hide private]

Class TestCase

source code

                        object --+                
                                 |                
            unittest.case.TestCase --+            
                                     |            
                            object --+            
                                     |            
    twisted.trial.unittest._Assertions --+        
                                         |        
twisted.trial.unittest.SynchronousTestCase --+    
                                             |    
               twisted.trial.unittest.TestCase --+
                                                 |
                       extern.log.log.Loggable --+
                                                 |
                                                TestCase
Known Subclasses:

Instance Methods [hide private]
 
failUnlessFailure(self, deferred, *expectedFailures)
Fail if deferred does not errback with one of expectedFailures.
source code
 
assertFailure(self, deferred, *expectedFailures)
Fail if deferred does not errback with one of expectedFailures.
source code
 
__init__(self, methodName=' impossible-name ')
Construct an asynchronous test case for methodName.
source code
 
getSlow(self)
Return whether this test has been marked as slow.
source code
 
debug(self, *args, **kwargs)
Run the test without collecting errors in a TestResult
source code

Inherited from twisted.trial.unittest.TestCase: __call__, __provides__, addCleanup, deferRunCleanups, deferSetUp, deferTearDown, deferTestMethod, getSuppress, getTimeout, visit

Inherited from twisted.trial.unittest.TestCase (private): _cbDeferRunCleanups, _cbDeferTestMethod, _classCleanUp, _cleanUp, _deprecateReactor, _ebDeferSetUp, _ebDeferTearDown, _ebDeferTestMethod, _makeReactorMethod, _run, _runCleanups, _runFixturesAndTest, _undeprecateReactor, _wait

Inherited from twisted.trial.unittest.SynchronousTestCase: __eq__, __ne__, callDeprecated, flushLoggedErrors, flushWarnings, getSkip, getTodo, mktemp, patch, run, runTest, shortDescription

Inherited from twisted.trial.unittest.SynchronousTestCase (private): _getSkipReason, _getSuppress, _installObserver, _removeObserver

Inherited from twisted.trial.unittest._Assertions: assertAlmostEqual, assertAlmostEquals, assertApproximates, assertEqual, assertEquals, assertFalse, assertIdentical, assertIn, assertIsInstance, assertNot, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIdentical, assertNotIn, assertNotIsInstance, assertNotSubstring, assertRaises, assertSubstring, assertTrue, assertWarns, assert_, fail, failIf, failIfAlmostEqual, failIfAlmostEquals, failIfEqual, failIfEquals, failIfIdentical, failIfIn, failIfIsInstance, failIfSubstring, failUnless, failUnlessAlmostEqual, failUnlessAlmostEquals, failUnlessApproximates, failUnlessEqual, failUnlessEquals, failUnlessFalse, failUnlessIdentical, failUnlessIn, failUnlessIsInstance, failUnlessRaises, failUnlessSubstring, failUnlessTrue, failUnlessWarns

Inherited from unittest.case.TestCase: __hash__, __providedBy__, __repr__, __str__, addTypeEqualityFunc, assertDictContainsSubset, assertDictEqual, assertGreater, assertGreaterEqual, assertIs, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotRegexpMatches, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTupleEqual, countTestCases, defaultTestResult, doCleanups, id, setUp, skipTest, tearDown

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Inherited from extern.log.log.Loggable: doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]
  supportedReactors = [<class 'twisted.internet.selectreactor.Se...

Inherited from twisted.trial.unittest.TestCase: __implemented__

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from twisted.trial.unittest.TestCase: timeout

Inherited from twisted.trial.unittest.SynchronousTestCase: failureException, skip, suppress, todo

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

failUnlessFailure(self, deferred, *expectedFailures)

source code 

Fail if deferred does not errback with one of expectedFailures. Returns the original Deferred with callbacks added. You will need to return this Deferred from your test case.

Overrides: twisted.trial.unittest._Assertions.assertFailure
(inherited documentation)

assertFailure(self, deferred, *expectedFailures)

source code 

Fail if deferred does not errback with one of expectedFailures. Returns the original Deferred with callbacks added. You will need to return this Deferred from your test case.

Overrides: twisted.trial.unittest._Assertions.assertFailure
(inherited documentation)

__init__(self, methodName=' impossible-name ')
(Constructor)

source code 

Construct an asynchronous test case for methodName.

Parameters:
  • methodName - The name of a method on self. This method should be a unit test. That is, it should be a short method that calls some of the assert* methods. If methodName is unspecified, runTest will be used as the test method. This is mostly useful for testing Trial.
Overrides: object.__init__
(inherited documentation)

getSlow(self)

source code 

Return whether this test has been marked as slow. Checks on the instance first, then the class, then the module, then packages. As soon as it finds something with a slow attribute, returns that. Returns False if it cannot find anything.

debug(self, *args, **kwargs)

source code 

Run the test without collecting errors in a TestResult

Overrides: extern.log.log.Loggable.debug
(inherited documentation)

Class Variable Details [hide private]

supportedReactors

Value:
[<class 'twisted.internet.selectreactor.SelectReactor'>]