Commit bbecd12
Add a check that required submodules are initialized
Adds test_required_submodule_is_initialized to test/test_fixture_health.py.
For each of the gitdb and smmap submodules, asserts that the working
tree directory exists and contains a .git marker (file or directory).
Failure prints an actionable message naming init-tests-after-clone.sh
as the remedy.
This is a regression test for a different contract than the existing
test_fixture_dir_is_trusted_by_git in this module. That test verifies
git's willingness to operate in each fixture directory (the
safe.directory / dubious-ownership contract). The new test verifies
that the directories are populated at all (the init-tests-after-clone.sh
contract). A bug class along these lines affected Arch Linux in gitpython-developers#1713
when init-tests-after-clone.sh stopped running git submodule update on
CI -- if a similar regression returns, this test catches it loudly with
a message naming the cause, instead of producing a cascade of opaque
downstream failures.
Paths are anchored at GIT_REPO -- the value of
GIT_PYTHON_TEST_GIT_REPO_BASE, falling back to the source tree -- so any
setup already satisfying the existing rorepo-redirection contract
automatically satisfies the new test.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ab71d65 commit bbecd12
1 file changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| |||
82 | 97 | | |
83 | 98 | | |
84 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
0 commit comments