X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f3b50e466969f9142393ec32a4b2a383ffbe5f23..2593af2c5d211b58e28f7c1472f1f67e6783216a:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index dd21d0a..3b3ab72 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -508,6 +508,8 @@ class BlackTestCase(BlackBaseTestCase): "pathlib.Path.cwd", return_value=working_directory ), patch("pathlib.Path.is_dir", side_effect=mock_n_calls([True])): ctx = FakeContext() + # Note that the root folder (project_root) isn't the folder + # named "root" (aka working_directory) ctx.obj["root"] = project_root report = MagicMock(verbose=True) black.get_sources( @@ -527,7 +529,7 @@ class BlackTestCase(BlackBaseTestCase): for _, mock_args, _ in report.path_ignored.mock_calls ), "A symbolic link was reported." report.path_ignored.assert_called_once_with( - Path("child", "b.py"), "matches a .gitignore file content" + Path("root", "child", "b.py"), "matches a .gitignore file content" ) def test_report_verbose(self) -> None: