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

Type TestCase

object --+
         |
        TestCase

Known Subclasses:
AttributeType_KnownValues, BERBaseEquality, BERBooleanKnownValues, BEREnumeratedKnownValues, BEREnumeratedSanityCheck, BERIntegerKnownValues, BERIntegerSanityCheck, BerLengths, BERNullKnownValues, BEROctetStringKnownValues, BEROctetStringSanityCheck, BERSequenceKnownValues, Bind, ConnectionLost, Dir2LDIF, DistinguishedName_Comparison, DistinguishedName_Init, FromLDIF, IdentitySearch, KnownValues, LDAPAutoFill_Posix, LDAPAutoFill_sambaAccount, LDAPAutoFill_sambaSamAccount, LDAPAutoFill_Simple, LDAPDistinguishedName_contains, LDAPDistinguishedName_DomainName, LDAPDistinguishedName_Malformed, LDAPDistinguishedName_Prettify, LDAPServerTest, LDAPSyntaxAddChild, LDAPSyntaxAttributes, LDAPSyntaxAttributesModificationOnWire, LDAPSyntaxBasics, LDAPSyntaxContainingNamingContext, LDAPSyntaxDelete, LDAPSyntaxDNs, LDAPSyntaxFetch, LDAPSyntaxLDIF, LDAPSyntaxMove, LDAPSyntaxPasswords, LDAPSyntaxRDNHandling, LDAPSyntaxSearch, LDIF2Dir, NetmaskToNumbits, ObjectClass_KnownValues, OnWire, Proxy, PtrSoaName, RelativeDistinguishedName_Init, RFC2254Examples, RFC2849_Examples, ServiceBindingProxy, TestAddOpLDIF, TestAuthentication, TestCallableOverride, TestCaseWithKnownValues, TestComparison, TestComparison, TestConfig, TestCSS, TestDelete, TestDeleteOpLDIF, TestDiff, TestDiffEntry, TestEntryMatch, TestEquality, TestInMemoryDatabase, TestInvalid, TestLDIFDeltaParsing, TestLDIFParsing, TestLMHash, TestMaybeSubstring, TestModificationComparison, TestModificationOpLDIF, TestModifications, TestNTHash, TestOperationLDIF, TestOperations, TestSchema, TestSetOperations, TestValid, TestWhitespace, Tree

Method Summary
  assert_(self, a, msg)
  assertAlmostEqual(self, a, b, c, msg)
  assertAlmostEquals(self, a, b, c, msg)
  assertApproximates(self, a, b, c, msg)
  assertEqual(self, a, b, msg)
  assertEquals(self, a, b, msg)
  assertIdentical(self, a, b, msg)
  assertIn(self, a, b, msg)
  assertNotAlmostEqual(self, a, b, c, msg)
  assertNotAlmostEquals(self, a, b, c, msg)
  assertNotEqual(self, a, b, msg)
  assertNotEquals(self, a, b, msg)
  assertNotIdentical(self, a, b, msg)
  assertNotIn(self, a, b, msg)
  assertRaises(self, exc, f, *a, **kw)
  fail(self, msg)
  failIf(self, a, msg)
  failIfAlmostEqual(self, a, b, c, msg)
  failIfEqual(self, a, b, msg)
  failIfEquals(self, a, b, msg)
  failIfIdentical(self, a, b, msg)
  failIfIn(self, a, b, msg)
  failUnless(self, a, msg)
  failUnlessAlmostEqual(self, a, b, c, msg)
  failUnlessEqual(self, a, b, msg)
  failUnlessIdentical(self, a, b, msg)
  failUnlessIn(self, a, b, msg)
  failUnlessRaises(self, exc, f, *a, **kw)
  mktemp(self)
will return a unique name that may be used as either a temporary directory or filename
  runReactor(self, timesOrSeconds, seconds)
DEPRECATED: just return a deferred from your test method and trial with do the Right Thing.
  setUp(self)
  setUpClass(self)
  tearDown(self)
  tearDownClass(self)
  _mktGetCounter(self, base)
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
Implements __implemented__ = <implementedBy twisted.trial.unittest....
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

mktemp(self)

will return a unique name that may be used as either a temporary directory or filename

Note: you must call os.mkdir on the value returned from this method if you wish to use it as a directory!

runReactor(self, timesOrSeconds, seconds=False)

DEPRECATED: just return a deferred from your test method and trial with do the Right Thing. Alternatively, call twisted.trial.util.wait to block until the deferred fires.

I'll iterate the reactor for a while.

You probably want to use expectedAssertions with this.
Parameters:
timesOrSeconds - Either the number of iterations to run, or, if `seconds' is True, the number of seconds to run for.
           (type=int)
seconds - If this is True, `timesOrSeconds' will be interpreted as seconds, rather than iterations.
           (type=bool)

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy twisted.trial.unittest.TestCase>                        

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0xb79a164c>       

Generated by Epydoc 2.1 on Mon Jul 25 16:22:13 2005 http://epydoc.sf.net