Package twisted :: Package trial :: Module unittest
[show private | hide private]
[frames | no frames]

Module twisted.trial.unittest

Twisted Test Framework
Classes
MinimalReporter  
Reporter I report results from a run of a test suite.
TestCase  
TestSuite  
TextReporter  
TreeReporter  
VerboseTextReporter  

Exceptions
FailTest Raised to indicate the current test has failed to pass.
SkipTest Raise this (with a reason) to skip the current test.

Function Summary
  deferredError(d, timeout)
Waits for deferred to fail, and it returns the Failure.
  deferredResult(d, timeout)
Waits for a Deferred to arrive, then returns or throws an exception, based on the result.
  extract_tb(tb, limit)
Extract a list of frames from a traceback, without unittest internals.
  format_exception(eType, eValue, tb, limit)
A formatted traceback and exception, without exposing the framework.
  isTestCase(testCase)
  isTestClass(testClass)

Variable Summary
int ASSERTION_IS_ERROR
string ERROR
string EXPECTED_FAILURE
string FAILURE
int False
_Feature nested_scopes
string SKIP
string SUCCESS
int True
string UNEXPECTED_SUCCESS

Function Details

deferredError(d, timeout=None)

Waits for deferred to fail, and it returns the Failure.

If the deferred succeeds, raises FailTest.

deferredResult(d, timeout=None)

Waits for a Deferred to arrive, then returns or throws an exception, based on the result.

extract_tb(tb, limit=None)

Extract a list of frames from a traceback, without unittest internals.

Functionally identical to traceback.extract_tb, but cropped to just the test case itself, excluding frames that are part of the Trial testing framework.

format_exception(eType, eValue, tb, limit=None)

A formatted traceback and exception, without exposing the framework.

I am identical in function to traceback.format_exception, but I screen out frames from the traceback that are part of the testing framework itself, leaving only the code being tested.

Variable Details

ASSERTION_IS_ERROR

Type:
int
Value:
0                                                                      

ERROR

Type:
string
Value:
'error'                                                                

EXPECTED_FAILURE

Type:
string
Value:
'expected failure'                                                     

FAILURE

Type:
string
Value:
'failure'                                                              

False

Type:
int
Value:
0                                                                      

nested_scopes

Type:
_Feature
Value:
Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'final', 0))                   

SKIP

Type:
string
Value:
'skip'                                                                 

SUCCESS

Type:
string
Value:
'success'                                                              

True

Type:
int
Value:
1                                                                      

UNEXPECTED_SUCCESS

Type:
string
Value:
'unexpected success'                                                   

Generated by Epydoc 1.1 on Thu Apr 17 12:52:28 2003 http://epydoc.sf.net