MCPcopy
hub / github.com/django/django / handle

Method handle

django/core/management/commands/test.py:54–66  ·  view source on GitHub ↗
(self, *test_labels, **options)

Source from the content-addressed store, hash-verified

52 test_runner_class.add_arguments(parser)
53
54 def handle(self, *test_labels, **options):
55 TestRunner = get_runner(settings, options["testrunner"])
56
57 time_keeper = TimeKeeper() if options.get("timing", False) else NullTimeKeeper()
58 parallel = options.get("parallel")
59 if parallel == "auto":
60 options["parallel"] = get_max_test_processes()
61 test_runner = TestRunner(**options)
62 with time_keeper.timed("Total run"):
63 failures = test_runner.run_tests(test_labels)
64 time_keeper.print_results()
65 if failures:
66 sys.exit(1)

Callers

nothing calls this directly

Calls 9

get_runnerFunction · 0.90
TimeKeeperClass · 0.90
NullTimeKeeperClass · 0.90
get_max_test_processesFunction · 0.90
TestRunnerClass · 0.85
getMethod · 0.45
timedMethod · 0.45
run_testsMethod · 0.45
print_resultsMethod · 0.45

Tested by

no test coverage detected