MCPcopy
hub / github.com/django/django / _test_output

Method _test_output

tests/test_runner/test_debug_sql.py:228–247  ·  view source on GitHub ↗
(self, verbosity)

Source from the content-addressed store, hash-verified

226 raise Exception
227
228 def _test_output(self, verbosity):
229 runner = DiscoverRunner(debug_sql=True, verbosity=0)
230 suite = runner.test_suite()
231 suite.addTest(self.FailingTest())
232 suite.addTest(self.ErrorTest())
233 suite.addTest(self.PassingTest())
234 suite.addTest(self.PassingSubTest())
235 suite.addTest(self.FailingSubTest())
236 suite.addTest(self.ErrorSubTest())
237 old_config = runner.setup_databases()
238 stream = StringIO()
239 resultclass = runner.get_resultclass()
240 runner.test_runner(
241 verbosity=verbosity,
242 stream=stream,
243 resultclass=resultclass,
244 ).run(suite)
245 runner.teardown_databases(old_config)
246
247 return stream.getvalue()
248
249 def test_output_normal(self):
250 full_output = self._test_output(1)

Callers 2

test_output_normalMethod · 0.95
test_output_verboseMethod · 0.95

Calls 8

setup_databasesMethod · 0.95
get_resultclassMethod · 0.95
teardown_databasesMethod · 0.95
DiscoverRunnerClass · 0.90
addTestMethod · 0.80
test_runnerMethod · 0.80
runMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected