Test that setting target without lock raises error.
(testrepo: Repository)
| 123 | |
| 124 | |
| 125 | def test_transaction_error_without_lock(testrepo: Repository) -> None: |
| 126 | """Test that setting target without lock raises error.""" |
| 127 | new_target = Oid(hex='5ebeeebb320790caf276b9fc8b24546d63316533') |
| 128 | |
| 129 | with pytest.raises(KeyError, match='not locked'): |
| 130 | with testrepo.transaction() as txn: |
| 131 | # Try to set target without locking first |
| 132 | txn.set_target('refs/heads/master', new_target, message='Should fail') |
| 133 | |
| 134 | |
| 135 | def test_transaction_isolated_across_threads(testrepo: Repository) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…