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

Method test_invalid_nested_gitignore

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

Source from the content-addressed store, hash-verified

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"
2299 empty_config = path / "pyproject.toml"
2300 result = BlackRunner().invoke(
2301 black.main, ["--verbose", "--config", str(empty_config), str(path)]
2302 )
2303 assert result.exit_code == 1
2304 assert result.stderr_bytes is not None
2305
2306 gitignore = path / "a" / ".gitignore"
2307 assert f"Could not parse {gitignore}" in result.stderr_bytes.decode()
2308
2309 def test_gitignore_that_ignores_subfolders(self) -> None:
2310 # If gitignore with */* is in root

Callers

nothing calls this directly

Calls 1

BlackRunnerClass · 0.85

Tested by

no test coverage detected