MCPcopy
hub / github.com/treeverse/dvc / test_repro_changed_code

Function test_repro_changed_code

tests/func/repro/test_repro.py:716–730  ·  view source on GitHub ↗
(tmp_dir, dvc, copy_script)

Source from the content-addressed store, hash-verified

714
715
716def test_repro_changed_code(tmp_dir, dvc, copy_script):
717 tmp_dir.gen("bar", "bar")
718 tmp_dir.dvc_gen("foo", "foo")
719 stage = dvc.run(
720 outs=["file1"],
721 deps=["foo", "copy.py"],
722 cmd="python copy.py foo file1",
723 name="run1",
724 )
725 with (tmp_dir / "copy.py").open("a+", encoding="utf8") as f:
726 f.write("\nshutil.copyfile('bar', sys.argv[2])")
727 stages = dvc.reproduce(stage.addressing)
728
729 assert filecmp.cmp("file1", "bar", shallow=False)
730 assert len(stages) == 1
731
732
733def test_repro_changed_data(tmp_dir, dvc, copy_script):

Callers

nothing calls this directly

Calls 6

dvc_genMethod · 0.80
openMethod · 0.80
writeMethod · 0.80
genMethod · 0.45
runMethod · 0.45
reproduceMethod · 0.45

Tested by

no test coverage detected