Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbdff7ec

Browse files
committed
fix(blame): Support Python 3.7 in the test suite
Apparently the public attributes of a `MagicMock` changed between 3.7 and 3.8,which was causing the unit test for `rev_opts` to fail.The unit test has been improved to use more stable APIs so that it can pass inall versions of Python supported by GitPython.
1 parentc0225b3 commitbdff7ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎test/test_repo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,8 @@ def test_blame_complex_revision(self, git):
557557
deftest_blame_accepts_rev_opts(self,git):
558558
res=self.rorepo.blame("HEAD","README.md",rev_opts=["-M","-C","-C"])
559559
expected_args= ['blame','HEAD','-M','-C','-C','--','README.md']
560-
foridx,arginenumerate(expected_args):
561-
self.assertEqual(git.call_args.args[idx],arg)
560+
boilerplate_kwargs= {"p" :True,"stdout_as_string":False}
561+
git.assert_called_once_with(*expected_args,**boilerplate_kwargs)
562562

563563
@skipIf(
564564
HIDE_WINDOWS_KNOWN_ERRORSandGit.is_cygwin(),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp