mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-21 15:28:29 +01:00
dvc: add confirmation for dvc destroy
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
586fde5f95
commit
fef8ea4602
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
|
||||
from dvc.main import main
|
||||
|
||||
from tests.test_repro import TestRepro
|
||||
|
||||
|
||||
class TestDestroyNoConfirmation(TestRepro):
|
||||
def test(self):
|
||||
ret = main(['destroy'])
|
||||
self.assertNotEqual(ret, 0)
|
||||
|
||||
|
||||
class TestDestroyForce(TestRepro):
|
||||
def test(self):
|
||||
ret = main(['destroy', '-f'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
self.assertFalse(os.path.exists(self.dvc.dvc_dir))
|
||||
self.assertFalse(os.path.exists(self.file1_stage))
|
||||
self.assertFalse(os.path.exists(self.file1))
|
||||
Reference in New Issue
Block a user