module documentation

Undocumented

Class ​Discover​Runner A Django test runner that uses unittest2 test discovery.
Variable tblib Undocumented
Class ​Debug​SQLText​Test​Result Undocumented
Class ​Dummy​List Dummy list class for faking storage of results in unittest.TestResult.
Class ​Parallel​Test​Suite Run a series of tests in parallel in several processes.
Class ​PDBDebug​Result Custom result class that triggers a PDB session when an error or failure occurs.
Class ​Remote​Test​Result Extend unittest.TestResult to record events in the child processes so they can be replayed in the parent process. Events include things like which tests succeeded or failed.
Class ​Remote​Test​Runner Run tests and record everything but don't display anything.
Class ​Shuffler No summary
Function ​_class​_shuffle​_key Undocumented
Function ​_init​_worker Switch to databases dedicated to this worker.
Function ​_run​_subsuite Run a suite of tests with a RemoteTestRunner and return a RemoteTestResult.
Function filter​_tests​_by​_tags Return the matching tests as an iterator.
Function find​_top​_level Undocumented
Function get​_max​_test​_processes The maximum number of test processes when using the --parallel option.
Function parallel​_type Parse value passed to the --parallel option.
Function partition​_suite​_by​_case Partition a test suite by test case, preserving the order of tests.
Function reorder​_test​_bin Return an iterator that reorders the given tests, keeping tests next to other tests of their class.
Function reorder​_tests Reorder an iterable of tests, grouping by the given TestCase classes.
Function shuffle​_tests Return an iterator over the given tests in a shuffled order, keeping tests next to other tests of their class.
Function test​_match​_tags Undocumented
Function try​_importing Try importing a test label, and return (is_importable, is_package).
Variable ​_worker​_id Undocumented
tblib =

Undocumented

def _class_shuffle_key(cls):

Undocumented

def _init_worker(counter):

Switch to databases dedicated to this worker.

This helper lives at module-level because of the multiprocessing module's requirements.

def _run_subsuite(args):

Run a suite of tests with a RemoteTestRunner and return a RemoteTestResult.

This helper lives at module-level and its arguments are wrapped in a tuple because of the multiprocessing module's requirements.

def filter_tests_by_tags(tests, tags, exclude_tags):
Return the matching tests as an iterator.
def find_top_level(top_level):

Undocumented

def get_max_test_processes():
The maximum number of test processes when using the --parallel option.
def parallel_type(value):
Parse value passed to the --parallel option.
def partition_suite_by_case(suite):
Partition a test suite by test case, preserving the order of tests.
def reorder_test_bin(tests, shuffler=None, reverse=False):

Return an iterator that reorders the given tests, keeping tests next to other tests of their class.

tests should be an iterable of tests that supports reversed().

def reorder_tests(tests, classes, reverse=False, shuffler=None):

Reorder an iterable of tests, grouping by the given TestCase classes.

This function also removes any duplicates and reorders so that tests of the same type are consecutive.

The result is returned as an iterator. classes is a sequence of types. Tests that are instances of classes[0] are grouped first, followed by instances of classes[1], etc. Tests that are not instances of any of the classes are grouped last.

If reverse is True, the tests within each classes group are reversed, but without reversing the order of classes itself.

The shuffler argument is an optional instance of this module's Shuffler class. If provided, tests will be shuffled within each classes group, but keeping tests with other tests of their TestCase class. Reversing is applied after shuffling to allow reversing the same random order.

def shuffle_tests(tests, shuffler):

Return an iterator over the given tests in a shuffled order, keeping tests next to other tests of their class.

tests should be an iterable of tests.

def test_match_tags(test, tags, exclude_tags):

Undocumented

def try_importing(label):

Try importing a test label, and return (is_importable, is_package).

Relative labels like "." and ".." are seen as directories.

_worker_id: int =

Undocumented