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

Method test_gitignore_used_as_default

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

Source from the content-addressed store, hash-verified

2185 )
2186
2187 def test_gitignore_used_as_default(self) -> None:
2188 base = Path(DATA_DIR / "include_exclude_tests")
2189 expected = [
2190 base / "b/.definitely_exclude/a.py",
2191 base / "b/.definitely_exclude/a.pyi",
2192 ]
2193 src = [base / "b/"]
2194 ctx = FakeContext()
2195 ctx.obj["root"] = base
2196 assert_collected_sources(src, expected, ctx=ctx, extend_exclude=r"/exclude/")
2197
2198 def test_gitignore_used_on_multiple_sources(self) -> None:
2199 root = Path(DATA_DIR / "gitignore_used_on_multiple_sources")

Callers

nothing calls this directly

Calls 2

FakeContextClass · 0.85
assert_collected_sourcesFunction · 0.85

Tested by

no test coverage detected