mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 23:10:10 +01:00
@@ -57,6 +57,25 @@ class TestMetrics(TestDvc):
|
||||
self.assertTrue(ret['baz']['metric_htsv'] == ['baz'])
|
||||
|
||||
|
||||
class TestMetricsReproCLI(TestDvc):
|
||||
def test(self):
|
||||
|
||||
stage = self.dvc.run(outs_no_cache=['metrics'],
|
||||
cmd='python {} {} {}'.format(self.CODE, self.FOO, 'metrics'))
|
||||
|
||||
ret = main(['metrics', 'add', 'metrics'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(['repro', '-m', stage.path])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(['metrics', 'remove', 'metrics'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(['repro', '-f', '-m', stage.path])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
|
||||
class TestMetricsCLI(TestMetrics):
|
||||
def test(self):
|
||||
#FIXME check output
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
|
||||
from dvc.updater import Updater
|
||||
|
||||
from tests.basic_env import TestDvc
|
||||
|
||||
|
||||
class TestDvcUpdater(TestDvc):
|
||||
def test(self):
|
||||
# NOTE: need to temporarily unset CI env to allow updater to work
|
||||
env = os.environ.copy()
|
||||
os.environ['CI'] = 'False'
|
||||
|
||||
self.dvc.updater.check()
|
||||
self.dvc.updater.check()
|
||||
self.dvc.updater.check()
|
||||
|
||||
os.environ = env
|
||||
Reference in New Issue
Block a user