diff --git a/tests/func/test_stage.py b/tests/func/test_stage.py index ec0fbe24af..bbfc7a765b 100644 --- a/tests/func/test_stage.py +++ b/tests/func/test_stage.py @@ -154,18 +154,18 @@ def test_remote_dependency(self): assert os.path.exists("movie.txt") -def test_md5_ignores_comments(repo_dir, dvc_repo): - stage, = dvc_repo.add("foo") +def test_md5_ignores_comments(tmp_dir, dvc): + stage, = tmp_dir.dvc_gen("foo", "foo content") with open(stage.path, "a") as f: f.write("# End comment\n") - new_stage = Stage.load(dvc_repo, stage.path) + new_stage = Stage.load(dvc, stage.path) assert not new_stage.changed_md5() -def test_meta_is_preserved(dvc_repo): - stage, = dvc_repo.add("foo") +def test_meta_is_preserved(tmp_dir, dvc): + stage, = tmp_dir.dvc_gen("foo", "foo content") # Add meta to DVC-file data = load_stage_file(stage.path) @@ -173,7 +173,7 @@ def test_meta_is_preserved(dvc_repo): dump_stage_file(stage.path, data) # Loading and dumping to test that it works and meta is retained - new_stage = Stage.load(dvc_repo, stage.path) + new_stage = Stage.load(dvc, stage.path) new_stage.dump() new_data = load_stage_file(stage.path)