mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
test: run pytest-style checks (#8901)
This commit is contained in:
@@ -36,7 +36,8 @@ def test_restore(tmp_dir, dvc, run_copy, mocker):
|
||||
|
||||
mock_restore.assert_called_once_with(stage, dry=False)
|
||||
mock_run.assert_not_called()
|
||||
assert (tmp_dir / "bar").exists() and not (tmp_dir / "foo").unlink()
|
||||
assert (tmp_dir / "bar").exists()
|
||||
assert not (tmp_dir / "foo").unlink()
|
||||
assert (tmp_dir / LOCK_FILE).exists()
|
||||
|
||||
|
||||
@@ -119,7 +120,8 @@ def test_memory_for_multiple_runs_of_same_stage(
|
||||
assert (tmp_dir / "bar").read_text() == "foo"
|
||||
mock_run.assert_not_called()
|
||||
mock_restore.assert_called_once_with(stage, dry=False)
|
||||
assert (tmp_dir / "bar").exists() and not (tmp_dir / "foo").unlink()
|
||||
assert (tmp_dir / "bar").exists()
|
||||
assert not (tmp_dir / "foo").unlink()
|
||||
assert (tmp_dir / LOCK_FILE).exists()
|
||||
|
||||
|
||||
@@ -180,5 +182,6 @@ def test_restore_pull(tmp_dir, dvc, run_copy, mocker, local_remote):
|
||||
mock_restore.assert_called_once_with(stage, pull=True, dry=False)
|
||||
mock_run.assert_not_called()
|
||||
assert mock_checkout.call_count == 2
|
||||
assert (tmp_dir / "bar").exists() and not (tmp_dir / "foo").unlink()
|
||||
assert (tmp_dir / "bar").exists()
|
||||
assert not (tmp_dir / "foo").unlink()
|
||||
assert (tmp_dir / LOCK_FILE).exists()
|
||||
|
||||
Reference in New Issue
Block a user