Skip to content

Commit 2d1efdc

Browse files
committed
Test that git.cmd.execute_kwargs is correct
1 parent fc755da commit 2d1efdc

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
import contextlib
8+
import inspect
89
import logging
910
import os
1011
import os.path as osp
@@ -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+
def test_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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy