(store, tmp_path)
| 320 | |
| 321 | |
| 322 | def test_clone_with_recursive_submodules(store, tmp_path): |
| 323 | sub = tmp_path.joinpath('sub') |
| 324 | sub.mkdir() |
| 325 | sub.joinpath('submodule').write_text('i am a submodule') |
| 326 | cmd_output('git', '-C', str(sub), 'init', '.') |
| 327 | cmd_output('git', '-C', str(sub), 'add', '.') |
| 328 | git.commit(str(sub)) |
| 329 | |
| 330 | repo = tmp_path.joinpath('repo') |
| 331 | repo.mkdir() |
| 332 | repo.joinpath('repository').write_text('i am a repo') |
| 333 | cmd_output('git', '-C', str(repo), 'init', '.') |
| 334 | cmd_output('git', '-C', str(repo), 'add', '.') |
| 335 | cmd_output('git', '-C', str(repo), 'submodule', 'add', str(sub), 'sub') |
| 336 | git.commit(str(repo)) |
| 337 | |
| 338 | rev = git.head_rev(str(repo)) |
| 339 | ret = store.clone(str(repo), rev) |
| 340 | |
| 341 | assert os.path.exists(ret) |
| 342 | assert os.path.exists(os.path.join(ret, str(repo), 'repository')) |
| 343 | assert os.path.exists(os.path.join(ret, str(sub), 'submodule')) |
nothing calls this directly
no test coverage detected