(testrepo: Repository)
| 333 | |
| 334 | |
| 335 | def test_reset_hard(testrepo: Repository) -> None: |
| 336 | ref = '5ebeeebb320790caf276b9fc8b24546d63316533' |
| 337 | with (Path(testrepo.workdir) / 'hello.txt').open() as f: |
| 338 | lines = f.readlines() |
| 339 | assert 'hola mundo\n' in lines |
| 340 | assert 'bonjour le monde\n' in lines |
| 341 | |
| 342 | testrepo.reset(ref, ResetMode.HARD) |
| 343 | assert testrepo.head.target == ref |
| 344 | |
| 345 | with (Path(testrepo.workdir) / 'hello.txt').open() as f: |
| 346 | lines = f.readlines() |
| 347 | # Hard reset will reset the working copy too |
| 348 | assert 'hola mundo\n' not in lines |
| 349 | assert 'bonjour le monde\n' not in lines |
| 350 | |
| 351 | |
| 352 | def test_reset_soft(testrepo: Repository) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…