1 | 2 | 3 Next
1 | 2 | 3 Next
All Samples(63701) | Call(17) | Derive(59898) | Import(3786)
A class whose instances are single test cases. By default, the test code itself should be placed in a method named 'runTest'. If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute. (more...)
All Samples(16608) | Call(14333) | Derive(373) | Import(1902)
A test suite is a composite test consisting of a number of TestCases. For use, create an instance of TestSuite, then add test case instances. When all tests have been added, the suite can be passed to a test runner, such as TextTestRunner. It will run the individual test cases in the order in which they were added, aggregating the results. When subclassing, do not forget to call the base class constructor.
All Samples(18539) | Call(17746) | Derive(0) | Import(793)
A command-line program that runs a set of tests; this is primarily for making test modules conveniently executable.
All Samples(1919) | Call(1757) | Derive(92) | Import(70)
This class is responsible for loading tests according to various criteria and returning them wrapped in a TestSuite
All Samples(1704) | Call(1408) | Derive(163) | Import(133)
A test runner class that displays results in textual form. It prints out the names of tests as they are run, errors as they occur, and a summary of the results at the end of the test run.
All Samples(745) | Call(622) | Derive(110) | Import(13)
Holder for test result information. Test results are automatically managed by the TestCase and TestSuite classes, and do not need to be explicitly manipulated by writers of tests. Each instance holds the total number of tests run, and collections of failures and errors that occurred among those test runs. The collections contain tuples of (testcase, exceptioninfo), where exceptioninfo is the formatted traceback of the error that occurred.
All Samples(121) | Call(0) | Derive(0) | Import(121)
This class is responsible for loading tests according to various criteria and returning them wrapped in a TestSuite
All Samples(388) | Call(385) | Derive(1) | Import(2)
A test case that wraps a test function.
This is useful for slipping pre-existing test functions into the
unittest 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.
All Samples(389) | Call(377) | Derive(5) | Import(7)
Raise this exception in a test to skip it. Usually you can use TestResult.skip() or one of the skipping decorators instead of raising this directly.
All Samples(111) | Call(7) | Derive(77) | Import(27)
A test result class that can print formatted text results to a stream. Used by TextTestRunner.
All Samples(149) | Call(66) | Derive(75) | Import(8)
A command-line program that runs a set of tests; this is primarily for making test modules conveniently executable.
1 | 2 | 3 Next