(self)
| 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" |
nothing calls this directly
no test coverage detected