selftests: Skip partitions test when mkfs not available

This test requires mkfs binary in order to run, while it's not really
essential for avocado testing. Let's skip it when it's not available.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 02c37011
......@@ -26,6 +26,8 @@ class TestPartition(unittest.TestCase):
Unit tests for avocado.utils.partition
"""
@unittest.skipIf(process.system("which mkfs", ignore_status=True),
"mkfs is required for these tests to run.")
def setUp(self):
try:
process.system("/bin/true", sudo=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册