(testrepo: Repository)
| 45 | |
| 46 | |
| 47 | def test_read(testrepo: Repository) -> None: |
| 48 | index = testrepo.index |
| 49 | assert len(index) == 2 |
| 50 | |
| 51 | with pytest.raises(TypeError): |
| 52 | index[()] |
| 53 | utils.assertRaisesWithArg(ValueError, -4, lambda: index[-4]) |
| 54 | utils.assertRaisesWithArg(KeyError, 'abc', lambda: index['abc']) |
| 55 | |
| 56 | sha = 'a520c24d85fbfc815d385957eed41406ca5a860b' |
| 57 | assert 'hello.txt' in index |
| 58 | assert index['hello.txt'].id == sha |
| 59 | assert index['hello.txt'].path == 'hello.txt' |
| 60 | assert index[1].id == sha |
| 61 | |
| 62 | |
| 63 | def test_add(testrepo: Repository) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…