MCPcopy Create free account
hub / github.com/psf/black / test_invalid_gitignore

Method test_invalid_gitignore

tests/test_black.py:2285–2295  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2283 assert_collected_sources([src], expected)
2284
2285 def test_invalid_gitignore(self) -> None:
2286 path = THIS_DIR / "data" / "invalid_gitignore_tests"
2287 empty_config = path / "pyproject.toml"
2288 result = BlackRunner().invoke(
2289 black.main, ["--verbose", "--config", str(empty_config), str(path)]
2290 )
2291 assert result.exit_code == 1
2292 assert result.stderr_bytes is not None
2293
2294 gitignore = path / ".gitignore"
2295 assert f"Could not parse {gitignore}" in result.stderr_bytes.decode()
2296
2297 def test_invalid_nested_gitignore(self) -> None:
2298 path = THIS_DIR / "data" / "invalid_nested_gitignore_tests"

Callers

nothing calls this directly

Calls 1

BlackRunnerClass · 0.85

Tested by

no test coverage detected