Module Index

Classes

Class: TestSet

This class is the test case for Set instances.

Classes

AssertionError

Assertion failed.

Methods

countTestCases (self)

debug (self)

Run the test without collecting errors in a TestResult

defaultTestResult (self)

fail (self, msg=None)

Fail immediately, with the given message.

failIf (self, expr, msg=None)

Fail the test if the expression is true.

failIf (self, expr, msg=None)

Fail the test if the expression is true.

failIfAlmostEqual (self, first, second, places=7, msg=None)

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).

failIfAlmostEqual (self, first, second, places=7, msg=None)

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).

failIfAlmostEqual (self, first, second, places=7, msg=None)

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).

failIfEqual (self, first, second, msg=None)

Fail if the two objects are equal as determined by the '==' operator.

failIfEqual (self, first, second, msg=None)

Fail if the two objects are equal as determined by the '==' operator.

failIfEqual (self, first, second, msg=None)

Fail if the two objects are equal as determined by the '==' operator.

failUnless (self, expr, msg=None)

Fail the test unless the expression is true.

failUnless (self, expr, msg=None)

Fail the test unless the expression is true.

failUnless (self, expr, msg=None)

Fail the test unless the expression is true.

failUnlessAlmostEqual (self, first, second, places=7, msg=None)

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).

failUnlessAlmostEqual (self, first, second, places=7, msg=None)

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).

failUnlessAlmostEqual (self, first, second, places=7, msg=None)

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit).

failUnlessEqual (self, first, second, msg=None)

Fail if the two objects are unequal as determined by the '==' operator.

failUnlessEqual (self, first, second, msg=None)

Fail if the two objects are unequal as determined by the '==' operator.

failUnlessEqual (self, first, second, msg=None)

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. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.

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. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.

id (self)

run (self, result=None)

setUp (self)

Create the test Set instance.

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.

tearDown (self)

Hook method for deconstructing the test fixture after testing it.

test_A_interface (self)

Test the Set instaface.

test_B_push (self)

Test the Set.push() method.

test_C_sort (self)

Test the Set.sort() method.

test_D_get (self)

Test the Set.get() method.

test_E_pop (self)

Test the Set.pop() method.

test_F_setitem (self)

Test the setitem operator.

test_G_getitem (self)

Test the getitem operator.

test_H_delitem (self)

Test the delitem operator.

test_I_iteritem (self)

Test the iteritem operator.