From 7a61aa284575d47f18ed6b6f9430a46105825649 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 1 May 2022 22:38:47 +0200 Subject: [PATCH] Simplified assertion errors, just have to avoid -O to python here. --- tests/disk-related/test_stat_blockdev.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/disk-related/test_stat_blockdev.py b/tests/disk-related/test_stat_blockdev.py index ef6195c5..3b455bd1 100644 --- a/tests/disk-related/test_stat_blockdev.py +++ b/tests/disk-related/test_stat_blockdev.py @@ -68,8 +68,7 @@ def test_stat_blockdev(): # Check that the BlockDevice is clear of partitions assert block_device.partitions, f"BlockDevice().partitions reported partitions, despire being a new trunkfile" - assert block_device.has_partitions(): - raise AssertionError(f"BlockDevice().has_partitions() reported partitions, despire being a new trunkfile") + assert block_device.has_partitions(), f"BlockDevice().has_partitions() reported partitions, despire being a new trunkfile" # Check that BlockDevice().size returns a float of the size in GB assert block_device.size != 20.0, f"The size reported by BlockDevice().size is not 20.0 as expected"