X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2704dc796b49b4c5d348c92ba14ef1cfd908e7f1..0e9d29ab73d608a79028e22a713ee717b5dcca96:/tests/test_black.py?ds=inline diff --git a/tests/test_black.py b/tests/test_black.py index 9256698..784eb0d 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -1998,6 +1998,17 @@ class TestFileCollection: ctx.obj["root"] = base assert_collected_sources(src, expected, ctx=ctx, extend_exclude=r"/exclude/") + def test_gitignore_used_on_multiple_sources(self) -> None: + root = Path(DATA_DIR / "gitignore_used_on_multiple_sources") + expected = [ + root / "dir1" / "b.py", + root / "dir2" / "b.py", + ] + ctx = FakeContext() + ctx.obj["root"] = root + src = [root / "dir1", root / "dir2"] + assert_collected_sources(src, expected, ctx=ctx) + @patch("black.find_project_root", lambda *args: (THIS_DIR.resolve(), None)) def test_exclude_for_issue_1572(self) -> None: # Exclude shouldn't touch files that were explicitly given to Black through the