(repo: Repository)
| 317 | |
| 318 | |
| 319 | def test_submodule_cache(repo: Repository) -> None: |
| 320 | # When the cache is turned on, looking up the same submodule twice must return the same git_submodule object |
| 321 | repo.submodules.cache_all() |
| 322 | sm1 = repo.submodules[SUBM_NAME] |
| 323 | sm2 = repo.submodules[SUBM_NAME] |
| 324 | assert sm1._subm == sm2._subm |
| 325 | |
| 326 | # After turning off the cache, each lookup must return a new git_submodule object |
| 327 | repo.submodules.cache_clear() |
| 328 | sm3 = repo.submodules[SUBM_NAME] |
| 329 | sm4 = repo.submodules[SUBM_NAME] |
| 330 | assert sm1._subm != sm3._subm |
| 331 | assert sm3._subm != sm4._subm |
| 332 | |
| 333 | |
| 334 | def test_submodule_reload(repo: Repository) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…