From 07fa6442b8dd3db8c54a566a9020e1c5eea5da15 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 19 Jul 2018 09:55:22 +0300 Subject: [PATCH] test: add `dvc status` simple test Signed-off-by: Ruslan Kuprieiev --- dvc/command/status.py | 3 +-- tests/test_repro.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dvc/command/status.py b/dvc/command/status.py index 712e65181..cce4c3f57 100644 --- a/dvc/command/status.py +++ b/dvc/command/status.py @@ -9,8 +9,7 @@ class CmdDataStatus(CmdDataBase): def _normalize(self, s): s+=':' - if len(s) >= self.STATUS_LEN: - return s + assert len(s) < self.STATUS_LEN return s + (self.STATUS_LEN - len(s))*' ' def _show(self, status, indent=0): diff --git a/tests/test_repro.py b/tests/test_repro.py index d7112c82b..d1c79453a 100644 --- a/tests/test_repro.py +++ b/tests/test_repro.py @@ -247,6 +247,9 @@ class TestReproMissingMd5InStageFile(TestRepro): class TestCmdRepro(TestRepro): def test(self): + ret = main(['status']) + self.assertEqual(ret, 0) + ret = main(['repro', self.file1_stage]) self.assertEqual(ret, 0)