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

Method test_include_exclude

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

Source from the content-addressed store, hash-verified

2171
2172class TestFileCollection:
2173 def test_include_exclude(self) -> None:
2174 path = THIS_DIR / "data" / "include_exclude_tests"
2175 src = [path]
2176 expected = [
2177 Path(path / "b/dont_exclude/a.py"),
2178 Path(path / "b/dont_exclude/a.pyi"),
2179 ]
2180 assert_collected_sources(
2181 src,
2182 expected,
2183 include=r"\.pyi?$",
2184 exclude=r"/exclude/|/\.definitely_exclude/",
2185 )
2186
2187 def test_gitignore_used_as_default(self) -> None:
2188 base = Path(DATA_DIR / "include_exclude_tests")

Callers

nothing calls this directly

Calls 1

assert_collected_sourcesFunction · 0.85

Tested by

no test coverage detected