def test_typeshed(self) -> None: # check we don't crash while checking typeshed test_stubs(parse_options(["--check-typeshed"]))
def test_missing_stubs(self) -> None: output = io.StringIO() with contextlib.redirect_stdout(output): test_stubs(parse_options(["not_a_module"])) assert "error: not_a_module failed to find stubs" in remove_color_code(output.getvalue())