MCPcopy Index your code
hub / github.com/RustPython/RustPython / _do_test

Method _do_test

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

Source from the content-addressed store, hash-verified

15class CommandLineInterface(unittest.TestCase):
16
17 def _do_test(self, *args, expect_success=True):
18 with (
19 captured_stdout() as out,
20 captured_stderr() as err,
21 self.assertRaises(SystemExit) as cm
22 ):
23 cli(args)
24 return out.getvalue(), err.getvalue(), cm.exception.code
25
26 def expect_success(self, *args):
27 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