mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 07:18:28 +01:00
Merge pull request #1046 from efiop/master
test: cover pipeline show --ascii
This commit is contained in:
@@ -63,6 +63,10 @@ class CmdPipelineShow(CmdBase):
|
||||
nodes.add(to_stage.relpath)
|
||||
edges.append((from_stage.relpath, to_stage.relpath))
|
||||
|
||||
nodes = list(nodes)
|
||||
if len(nodes) == 0:
|
||||
return
|
||||
|
||||
d = Dagascii(nodes, edges)
|
||||
d.draw()
|
||||
|
||||
|
||||
@@ -16,6 +16,18 @@ class TestPipelineShow(TestRepro):
|
||||
ret = main(['pipeline', 'show', self.file1_stage, '--outs'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
def test_ascii(self):
|
||||
ret = main(['pipeline', 'show', '--ascii', self.file1_stage])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
def test_ascii_commands(self):
|
||||
ret = main(['pipeline', 'show', '--ascii', self.file1_stage, '--commands'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
def test_ascii_outs(self):
|
||||
ret = main(['pipeline', 'show', '--ascii', self.file1_stage, '--outs'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
def test_not_dvc_file(self):
|
||||
ret = main(['pipeline', 'show', self.file1])
|
||||
self.assertNotEqual(ret, 0)
|
||||
|
||||
Reference in New Issue
Block a user