scm: Add dir property to Base class (#1281)

Close #1279
This commit is contained in:
Mr. Outis
2018-10-30 19:32:08 -06:00
committed by GitHub
parent c4295fa05c
commit acae1b996f
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -18,6 +18,10 @@ class Base(object):
self.project = project
self.root_dir = root_dir
@property
def dir(self):
return None
@staticmethod
def is_repo(root_dir):
return True
+6
View File
@@ -763,3 +763,9 @@ class TestReproShell(TestDvc):
with open(fname, 'r') as fd:
self.assertEqual(os.getenv('SHELL'), fd.read().strip())
class TestReproNoSCM(TestRepro):
def test(self):
shutil.rmtree(self.dvc.scm.dir)
ret = main(['repro', self.file1_stage])
self.assertEqual(ret, 0)