Class DiscoverRunner
A Django test runner that uses unittest2 test discovery.
Declaration
class DiscoverRunner
source linkDocumentation
Methods
▶ def __init__(self, pattern=None, top_level=None, verbosity=1, interactive=True, ...) def __init__(
self,
pattern=None,
top_level=None,
verbosity=1,
interactive=True,
failfast=False,
keepdb=False,
reverse=False,
debug_mode=False,
debug_sql=False,
parallel=0,
tags=None,
exclude_tags=None,
test_name_patterns=None,
pdb=False,
buffer=False,
enable_faulthandler=True,
timing=False,
**kwargs,
)
▷ def build_suite(self, test_labels=None, extra_tests=None, **kwargs) ▶ def run_tests(self, test_labels, extra_tests=None, **kwargs) Run the unit tests for all the test labels in the provided list.
Test labels should be dotted Python paths to test modules, test
classes, or test methods.
A list of 'extra' tests may also be provided; these tests
will be added to the test suite.
Return the number of tests that failed.
▷ def teardown_databases(self, old_config, **kwargs) Destroy all the non-mirror databases.
Class methods
@classmethod
def add_arguments(
cls,
parser,
)