summaryrefslogtreecommitdiff
path: root/test/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2022-09-01 07:59:02 +0800
committerGitHub <noreply@github.com>2022-09-01 07:59:02 +0800
commitbec61576ae75803bc4e60d8de7a629c194313d1c (patch)
tree087efdcdb3fc02be8a4bdd77e5dc6880c3170e6a /test/test_repo.py
parent73bde1f27711e48bd887b5a13cd5e3a0a8d9d723 (diff)
parent18a79d8028f934f8f78da33de3b0523fc7d1df47 (diff)
downloadgitpython-bec61576ae75803bc4e60d8de7a629c194313d1c.tar.gz
Merge pull request #1485 from thehale/blame/rev-opts
feat(blame): Support custom `rev_opts` for blame
Diffstat (limited to 'test/test_repo.py')
-rw-r--r--test/test_repo.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_repo.py b/test/test_repo.py
index 75b590fe..703dbb43 100644
--- a/test/test_repo.py
+++ b/test/test_repo.py
@@ -553,6 +553,13 @@ class TestRepo(TestBase):
self.assertEqual(len(res), 1)
self.assertEqual(len(res[0][1]), 83, "Unexpected amount of parsed blame lines")
+ @mock.patch.object(Git, "_call_process")
+ def test_blame_accepts_rev_opts(self, git):
+ res = self.rorepo.blame("HEAD", "README.md", rev_opts=["-M", "-C", "-C"])
+ expected_args = ['blame', 'HEAD', '-M', '-C', '-C', '--', 'README.md']
+ boilerplate_kwargs = {"p" : True, "stdout_as_string": False}
+ git.assert_called_once_with(*expected_args, **boilerplate_kwargs)
+
@skipIf(
HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
"""FIXME: File "C:\\projects\\gitpython\\git\\cmd.py", line 671, in execute