MCPcopy Index your code
hub / github.com/python/cpython / _do_test

Method _do_test

Lib/test/test_sqlite3/test_cli.py:26–33  ·  view source on GitHub ↗
(self, *args, expect_success=True)

Source from the content-addressed store, hash-verified

24class CommandLineInterface(unittest.TestCase):
25
26 def _do_test(self, *args, expect_success=True):
27 with (
28 captured_stdout() as out,
29 captured_stderr() as err,
30 self.assertRaises(SystemExit) as cm
31 ):
32 cli(args)
33 return out.getvalue(), err.getvalue(), cm.exception.code
34
35 def expect_success(self, *args):
36 out, err, code = self._do_test(*args)

Callers 2

expect_successMethod · 0.95
expect_failureMethod · 0.95

Calls 5

captured_stdoutFunction · 0.90
captured_stderrFunction · 0.90
cliFunction · 0.85
assertRaisesMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected