
upper (), 'FOO' ) def test_isupper ( self ): self. TestCase ): def test_upper ( self ): self.

Import unittest class TestStringMethods ( unittest. The runner may use a graphical interface,Ī textual interface, or return a special value to indicate the results of test runnerĪ test runner is a component which orchestrates the execution of testsĪnd provides the outcome to the user. Used to aggregate tests that should be executed together. test suiteĪ test suite is a collection of test cases, test suites, or both. TestCase, which may be used to create new test cases. This may involve, for example,Ĭreating temporary or proxy databases, directories, or starting a serverĪ test case is the individual unit of testing. Tests, and any associated cleanup actions.

To achieve this, unittest supports some important concepts in anĪ test fixture represents the preparation needed to perform one or more It supports test automation, sharing of setup and shutdown codeįor tests, aggregation of tests into collections, and independence of the The unittest unit testing framework was originally inspired by JUnitĪnd has a similar flavor as major unit testing frameworks in other

(If you are already familiar with the basic concepts of testing, you might want
