Merge pull request #562 from efiop/master

repro: fix --force option
This commit is contained in:
Ruslan Kuprieiev
2018-03-17 11:46:29 +02:00
committed by GitHub
3 changed files with 8 additions and 5 deletions
+1 -4
View File
@@ -41,14 +41,11 @@ environment:
# PYTHON_ARCH: "64"
install:
- cinst graphviz
- cinst wget
- cinst awscli
- cinst gsutil
- cinst openssl.light
- wget --no-check-certificate https://github.com/dpinney/omf/raw/master/omf/static/pygraphviz-1.3.1-cp27-none-win32.whl
- pip install --upgrade pip setuptools
- pip install pygraphviz-1.3.1-cp27-none-win32.whl
- pip install --user --upgrade pip
- pip install -r requirements.txt
- python setup.py install
+1 -1
View File
@@ -125,7 +125,7 @@ class Project(object):
return stage
def _reproduce_stage(self, stages, node, force):
if not stages[node].changed():
if not stages[node].changed() and not force:
return []
stages[node].reproduce(force=force)
+6
View File
@@ -25,6 +25,12 @@ class TestRepro(TestDvc):
cmd='python {} {} {}'.format(self.CODE, self.FOO, self.file1))
class TestReproForce(TestRepro):
def test(self):
stages = self.dvc.reproduce(self.file1_stage, force=True)
self.assertEqual(len(stages), 2)
class TestReproChangedCode(TestRepro):
def test(self):
self.swap_code()