From 14b2ee473a9333f27590e7c31185d7680951a80f Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 7 Aug 2023 17:39:13 +0100 Subject: [PATCH] mark config tests as slow --- tests/test_configs.py | 11 +++++++++++ tests/test_lower.py | 9 +-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/test_configs.py b/tests/test_configs.py index c93e031..4bd212d 100644 --- a/tests/test_configs.py +++ b/tests/test_configs.py @@ -1,3 +1,5 @@ +import time + import pytest from tests import data, vban @@ -11,11 +13,20 @@ class TestSetAndGetBoolHigher: @classmethod def setup_class(cls): vban.apply_config("example") + time.sleep(0.1) + @pytest.mark.skipif( + "not config.getoption('--run-slow')", + reason="Only run when --run-slow is given", + ) def test_it_tests_config_string(self): assert "PhysStrip" in vban.strip[data.phys_in].label assert "VirtStrip" in vban.strip[data.virt_in].label + @pytest.mark.skipif( + "not config.getoption('--run-slow')", + reason="Only run when --run-slow is given", + ) def test_it_tests_config_bool(self): assert vban.strip[0].A1 == True diff --git a/tests/test_lower.py b/tests/test_lower.py index e6278a9..f5a1c05 100644 --- a/tests/test_lower.py +++ b/tests/test_lower.py @@ -1,5 +1,3 @@ -import time - import pytest from tests import data, vban @@ -17,10 +15,6 @@ class TestPublicPacketLower: ) -@pytest.mark.skipif( - "not config.getoption('--run-slow')", - reason="Only run when --run-slow is given", -) @pytest.mark.parametrize("value", [0, 1]) class TestSetRT: __test__ = True @@ -35,7 +29,6 @@ class TestSetRT: ], ) def test_it_sends_a_text_request(self, kls, index, param, value): - vban._set_rt(f"{kls}[{index}]", param, value) - time.sleep(0.02) + vban._set_rt(f"{kls}[{index}].{param}", value) target = getattr(vban, kls)[index] assert getattr(target, param) == bool(value)