From 23d4cf32a5d21ff88c5fb8771a3c73726ab3f4cb Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Fri, 11 Oct 2024 12:50:38 +0200 Subject: [PATCH] tests: Do not set logging when loading gpt_test We don't want to set logging when skipping the test case so it cannot be defined on the module level. --- tests/vmtests/gpt_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/vmtests/gpt_test.py b/tests/vmtests/gpt_test.py index 9633b38d8..c086f5ac0 100644 --- a/tests/vmtests/gpt_test.py +++ b/tests/vmtests/gpt_test.py @@ -14,8 +14,6 @@ import parted -set_up_logging() - class GPTTestBase(VMBackedTestCase): @@ -34,6 +32,12 @@ def __init__(self, *args, **kwargs): self.usrluks = None self.usr = None + @classmethod + def setUpClass(cls): + super().setUpClass() + + set_up_logging() + def set_up_disks(self): disklabel.DiskLabel.set_default_label_type("gpt")