MCPcopy
hub / github.com/coderamp-labs/gitingest / test_create_git_command

Function test_create_git_command

tests/test_git_utils.py:87–102  ·  view source on GitHub ↗

Test that ``create_git_command`` builds the correct command list based on inputs.

(
    base_cmd: list[str],
    local_path: str,
    url: str,
    token: str | None,
    expected_suffix: list[str],
)

Source from the content-addressed store, hash-verified

85 ],
86)
87def test_create_git_command(
88 base_cmd: list[str],
89 local_path: str,
90 url: str,
91 token: str | None,
92 expected_suffix: list[str],
93) -> None:
94 """Test that ``create_git_command`` builds the correct command list based on inputs."""
95 cmd = create_git_command(base_cmd, local_path, url, token)
96
97 # The command should start with base_cmd and the -C option
98 expected_prefix = [*base_cmd, "-C", local_path]
99 assert cmd[: len(expected_prefix)] == expected_prefix
100
101 # The suffix (anything after prefix) should match expected
102 assert cmd[len(expected_prefix) :] == expected_suffix
103
104
105@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

create_git_commandFunction · 0.90

Tested by

no test coverage detected