Repository navigation
test(repos): repos and branches tests use git fake - #2921
Merged
Merged
Conversation
Migrate the repos, branches, github, ssh, devcontainer, tf, and openspec test suites to reach git through the git fake. - Replace real git subprocesses with in-process GitFake and ProcessFake. - Construct worktree and repo metadata in Python under temporary paths. - Remove internal devops_cli patches for git subprocesses. - Verify 0 git subprocess starts across all 10 migrated test files. - Test durations across the 10 files improved from 25.36s (36.12s total) to 21.04s. Closes #2183
Set usedforsecurity=False on test sha1 calls in test_repos_worktrees.py to satisfy bandit security analysis rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the repos, branches, github, ssh, devcontainer, tf, and openspec test suites to reach git through the git fake of #2146.
Zero tests start git subprocesses during execution, verified through a PEP 578 audit hook on
subprocess.Popen.Acceptance Criteria
devops_cliname for git operations.uv run pytest <files> -n 0 --durations=0):devops ci lint,devops ci format --check,devops ci typecheck).Closes #2183