MCPcopy Index your code
hub / github.com/python/mypy / test_capture_bad_opt

Method test_capture_bad_opt

mypy/test/testapi.py:23–27  ·  view source on GitHub ↗

stderr should be captured when a bad option is passed.

(self)

Source from the content-addressed store, hash-verified

21 assert self.stderr.getvalue() == ""
22
23 def test_capture_bad_opt(self) -> None:
24 """stderr should be captured when a bad option is passed."""
25 _, stderr, _ = mypy.api.run(["--some-bad-option"])
26 assert isinstance(stderr, str)
27 assert stderr != ""
28
29 def test_capture_empty(self) -> None:
30 """stderr should be captured when a bad option is passed."""

Callers

nothing calls this directly

Calls 2

isinstanceFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected