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

Commit2d1efdc

Browse files
committed
Test that git.cmd.execute_kwargs is correct
1 parentfc755da commit2d1efdc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎test/test_git.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# This module is part of GitPython and is released under
66
# the BSD License: https://opensource.org/license/bsd-3-clause/
77
importcontextlib
8+
importinspect
89
importlogging
910
importos
1011
importos.pathasosp
@@ -364,3 +365,11 @@ def counter_stderr(line):
364365

365366
self.assertEqual(count[1],line_count)
366367
self.assertEqual(count[2],line_count)
368+
369+
deftest_execute_kwargs_set_agrees_with_method(self):
370+
parameter_names=inspect.signature(cmd.Git.execute).parameters.keys()
371+
self_param,command_param,*most_params,extra_kwargs_param=parameter_names
372+
self.assertEqual(self_param,"self")
373+
self.assertEqual(command_param,"command")
374+
self.assertEqual(set(most_params),cmd.execute_kwargs)# Most important.
375+
self.assertEqual(extra_kwargs_param,"subprocess_kwargs")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp