Package lemon :: Package external :: Package Cheetah :: Package Tests :: Module unittest_local_copy :: Class FunctionTestCase
[show private | hide private]
[frames | no frames]

Class FunctionTestCase

TestCase --+
           |
          FunctionTestCase


A test case that wraps a test function.

This is useful for slipping pre-existing test functions into the
PyUnit framework. Optionally, set-up and tidy-up functions can be
supplied. As with TestCase, the tidy-up ('tearDown') function will
always be called if the set-up ('setUp') function ran successfully.

Method Summary
  __init__(self, testFunc, setUp, tearDown, description)
  __repr__(self)
  __str__(self)
  describe(self)
Returns a one-line description of the test, or None if no description has been provided.
  id(self)
  runTest(self)
  setUp(self)
Hook method for setting up the test fixture before exercising it.
  shortDescription(self)
Returns a one-line description of the test, or None if no description has been provided.
  tearDown(self)
Hook method for deconstructing the test fixture after testing it.
    Inherited from TestCase
  __call__(self, result)
  assert_(self, expr, msg)
Fail the test unless the expression is true.
  assertEqual(self, first, second, msg)
Fail if the two objects are unequal as determined by the '!=' operator.
  assertEquals(self, first, second, msg)
Fail if the two objects are unequal as determined by the '!=' operator.
  assertNotEqual(self, first, second, msg)
Fail if the two objects are equal as determined by the '==' operator.
  assertNotEquals(self, first, second, msg)
Fail if the two objects are equal as determined by the '==' operator.
  assertRaises(self, excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs.
  countTestCases(self)
  debug(self)
Run the test without collecting errors in a TestResult...
  defaultTestResult(self)
  explain(self)
  fail(self, msg)
Fail immediately, with the given message.
  failIf(self, expr, msg)
Fail the test if the expression is true.
  failIfEqual(self, first, second, msg)
Fail if the two objects are equal as determined by the '==' operator.
  failUnless(self, expr, msg)
Fail the test unless the expression is true.
  failUnlessEqual(self, first, second, msg)
Fail if the two objects are unequal as determined by the '!=' operator.
  failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs.
  run(self, result)
  setDescription(self, descr)
  setExplanation(self, expln)
  setId(self, id)

Class Variable Summary
    Inherited from TestCase
NoneType name = None                                                                  

Method Details

describe(self)

Returns a one-line description of the test, or None if no
description has been provided.

The default implementation of this method returns the first line of
the specified test method's docstring.
Overrides:
lemon.external.Cheetah.Tests.unittest_local_copy.TestCase.describe (inherited documentation)

setUp(self)

Hook method for setting up the test fixture before exercising it.
Overrides:
lemon.external.Cheetah.Tests.unittest_local_copy.TestCase.setUp (inherited documentation)

shortDescription(self)

Returns a one-line description of the test, or None if no
description has been provided.

The default implementation of this method returns the first line of
the specified test method's docstring.
Overrides:
lemon.external.Cheetah.Tests.unittest_local_copy.TestCase.describe (inherited documentation)

tearDown(self)

Hook method for deconstructing the test fixture after testing it.
Overrides:
lemon.external.Cheetah.Tests.unittest_local_copy.TestCase.tearDown (inherited documentation)

Generated by Epydoc 2.0 on Mon Nov 10 15:08:10 2003 http://epydoc.sf.net