From 26ef77cf96e04f6622f1c7e7e00a40af9b61e3c1 Mon Sep 17 00:00:00 2001 From: pawel Date: Tue, 10 Dec 2019 19:56:18 +0100 Subject: [PATCH] checkout: test: refactor to dir helpers --- tests/func/test_checkout.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/func/test_checkout.py b/tests/func/test_checkout.py index f2249bee14..24e114e2e0 100644 --- a/tests/func/test_checkout.py +++ b/tests/func/test_checkout.py @@ -475,11 +475,14 @@ def test(self): ) -def test_checkout_no_checksum(repo_dir, dvc_repo): - stage = dvc_repo.run(outs=[repo_dir.FOO], no_exec=True, cmd="somecmd") +def test_checkout_no_checksum(tmp_dir, dvc): + tmp_dir.gen("file", "file content") + stage = dvc.run(outs=["file"], no_exec=True, cmd="somecmd") + with pytest.raises(CheckoutError): - dvc_repo.checkout([stage.path], force=True) - assert not os.path.exists(repo_dir.FOO) + dvc.checkout([stage.path], force=True) + + assert not os.path.exists("file") @pytest.mark.skip