unittest.TestLoader

unittest :: TestLoader :: Class TestLoader |
[hide private]
[frames] | no frames]

# Class TestLoader

source code

    object --+
             |
            TestLoader

This class is responsible for loading tests according to various criteria and returning them wrapped in a Test

Nested Classes | [hide private]
| suiteClass A test suite is a composite test consisting of a number of TestCases.

Instance Methods | [hide private]
getTestCaseNames(self, testCaseClass) Return a sorted sequence of method names found within testCaseClass | source code
loadTestsFromModule(self, module) Return a suite of all tests cases contained in the given module | source code
loadTestsFromName(self, name, module=None) Return a suite of all tests cases given a string specifier. | source code
loadTestsFromNames(self, names, module=None) Return a suite of all tests cases found using the given sequence of string specifiers. | source code
loadTestsFromTestCase(self, testCaseClass) Return a suite of all tests cases contained in testCaseClass | source code
sortTestMethodsUsing(x, y) Return negative if x<y, zero if x==y, positive if x>y. |
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]
| testMethodPrefix = ``'``test``'``

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### loadTestsFromName(self, name, module=None) | source code
Return a suite of all tests cases given a string specifier. The name may resolve either to a module, a test case class, a test method within a test case class, or a callable object which returns a TestCase or TestSuite instance. The method optionally resolves the names relative to a given module.

### loadTestsFromNames(self, names, module=None) | source code
Return a suite of all tests cases found using the given sequence of string specifiers. See 'loadTestsFromName()'.

### sortTestMethodsUsing(x, y) |
  Return negative if x<y, zero if x==y, positive if x>y. Returns:
      integer