| 105 | |
| 106 | |
| 107 | def test_commit_changed_md5(tmp_dir, dvc): |
| 108 | tmp_dir.gen({"file": "file content"}) |
| 109 | (stage,) = dvc.add("file", no_commit=True) |
| 110 | |
| 111 | stage_file_content = (tmp_dir / stage.path).parse() |
| 112 | stage_file_content["md5"] = "1111111111" |
| 113 | (tmp_dir / stage.path).dump(stage_file_content) |
| 114 | |
| 115 | with pytest.raises(StageCommitError): |
| 116 | dvc.commit(stage.path) |
| 117 | |
| 118 | dvc.commit(stage.path, force=True) |
| 119 | assert "md5" not in (tmp_dir / stage.path).parse() |
| 120 | |
| 121 | |
| 122 | def test_commit_no_exec(tmp_dir, dvc): |