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

Function test_pull_stats

tests/func/test_data_cloud.py:485–515  ·  view source on GitHub ↗
(tmp_dir, dvc, capsys, local_remote)

Source from the content-addressed store, hash-verified

483
484
485def test_pull_stats(tmp_dir, dvc, capsys, local_remote):
486 tmp_dir.dvc_gen(
487 {
488 "foo": "foo",
489 "bar": "bar",
490 "lorem": "lorem",
491 "dir": {"file": "file"},
492 "ipsum": "ipsum",
493 "dolor": "dolor",
494 }
495 )
496 dvc.push()
497 clean(["foo", "bar", "dir", "lorem"], dvc)
498
499 (tmp_dir / "ipsum.dvc").unlink()
500 (tmp_dir / "bar").write_text("foobar")
501
502 assert main(["pull", "--force"]) == 0
503 out, _ = capsys.readouterr()
504 assert out.splitlines() == [
505 "M\tbar".expandtabs(),
506 "A\tdir".expandtabs() + os.sep,
507 "A\tfoo".expandtabs(),
508 "A\tlorem".expandtabs(),
509 "D\tipsum".expandtabs(),
510 "6 files fetched, 1 file modified, 3 files added and 1 file deleted",
511 ]
512
513 main(["pull"])
514 out, _ = capsys.readouterr()
515 assert out == "Everything is up to date.\n"
516
517
518@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 6

mainFunction · 0.90
dvc_genMethod · 0.80
unlinkMethod · 0.80
write_textMethod · 0.80
cleanFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected