From eb3bc1023b26b4bad172cea5dc4cbdb776e363bd Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 7 Nov 2015 00:11:36 +0100 Subject: [PATCH] make basic test more robust counting lines is a bad idea. just one unrelated output line and the test fails. thus we rather check if what we expect is in the output. --- borg/testsuite/archiver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py index a70cd7eaa..8ec0297fd 100644 --- a/borg/testsuite/archiver.py +++ b/borg/testsuite/archiver.py @@ -304,7 +304,9 @@ class ArchiverTestCase(ArchiverTestCaseBase): self.cmd('create', '--stats', self.repository_location + '::test.2', 'input') with changedir('output'): self.cmd('extract', self.repository_location + '::test') - self.assert_equal(len(self.cmd('list', self.repository_location).splitlines()), 2) + list_output = self.cmd('list', self.repository_location) + self.assert_in('test ', list_output) + self.assert_in('test.2 ', list_output) expected = [ 'input', 'input/bdev',