(testrepo: Repository)
| 231 | |
| 232 | |
| 233 | def test_checkout_index(testrepo: Repository) -> None: |
| 234 | # some changes to working dir |
| 235 | with (Path(testrepo.workdir) / 'hello.txt').open('w') as f: |
| 236 | f.write('new content') |
| 237 | |
| 238 | # checkout index |
| 239 | assert 'hello.txt' in testrepo.status() |
| 240 | testrepo.checkout(strategy=CheckoutStrategy.FORCE) |
| 241 | assert 'hello.txt' not in testrepo.status() |
| 242 | |
| 243 | |
| 244 | def test_checkout_head(testrepo: Repository) -> None: |