diff --git a/basetest.py b/basetest.py index c402cea..791c606 100644 --- a/basetest.py +++ b/basetest.py @@ -30,9 +30,9 @@ def prepare_zpools(): subprocess.check_call("modprobe brd rd_size=512000", shell=True) #remove old stuff - subprocess.call("zpool destroy test_source1", shell=True) - subprocess.call("zpool destroy test_source2", shell=True) - subprocess.call("zpool destroy test_target1", shell=True) + subprocess.call("zpool destroy test_source1 2>/dev/null", shell=True) + subprocess.call("zpool destroy test_source2 2>/dev/null", shell=True) + subprocess.call("zpool destroy test_target1 2>/dev/null", shell=True) #create pools subprocess.check_call("zpool create test_source1 /dev/ram0", shell=True) diff --git a/test_zfsautobackup.py b/test_zfsautobackup.py index 21e4aaa..239121b 100644 --- a/test_zfsautobackup.py +++ b/test_zfsautobackup.py @@ -8,4 +8,8 @@ class TestZfsAutobackup(unittest.TestCase): return super().setUp() def test_defaults(self): - self.assertFalse(ZfsAutobackup("test test_target1".split(" ")).run()) + with self.subTest("defaults with full verbose and debug"): + self.assertFalse(ZfsAutobackup("test test_target1 --verbose --debug".split(" ")).run()) + + with self.subTest("bare defaults"): + self.assertFalse(ZfsAutobackup("test test_target1".split(" ")).run())