X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2c90480e1a102ab0fac57737d2ba5143d82abed7..767604e03f5e454ae5b5c268cd5831c672f46de8:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index 089e043..abd4d00 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -1990,6 +1990,13 @@ class TestFileCollection: ) assert sorted(expected) == sorted(sources) + def test_nested_gitignore_directly_in_source_directory(self) -> None: + # https://github.com/psf/black/issues/2598 + path = Path(DATA_DIR / "nested_gitignore_tests") + src = Path(path / "root" / "child") + expected = [src / "a.py", src / "c.py"] + assert_collected_sources([src], expected) + def test_invalid_gitignore(self) -> None: path = THIS_DIR / "data" / "invalid_gitignore_tests" empty_config = path / "pyproject.toml"