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

Method expect_success

Lib/test/test_sqlite3/test_cli.py:35–40  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

33 return out.getvalue(), err.getvalue(), cm.exception.code
34
35 def expect_success(self, *args):
36 out, err, code = self._do_test(*args)
37 self.assertEqual(code, 0,
38 "\n".join([f"Unexpected failure: {args=}", out, err]))
39 self.assertEqual(err, "")
40 return out
41
42 def expect_failure(self, *args):
43 out, err, code = self._do_test(*args, expect_success=False)

Callers 4

test_cli_helpMethod · 0.95
test_cli_versionMethod · 0.95
test_cli_execute_sqlMethod · 0.95
test_cli_on_disk_dbMethod · 0.95

Calls 3

_do_testMethod · 0.95
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected