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

Method expect_failure

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

Source from the content-addressed store, hash-verified

40 return out
41
42 def expect_failure(self, *args):
43 out, err, code = self._do_test(*args, expect_success=False)
44 self.assertNotEqual(code, 0,
45 "\n".join([f"Unexpected failure: {args=}", out, err]))
46 self.assertEqual(out, "")
47 return err
48
49 def test_cli_help(self):
50 out = self.expect_success("-h")

Calls 4

_do_testMethod · 0.95
assertNotEqualMethod · 0.80
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected