mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-02-22 17:55:15 +00:00
mark config tests as slow
This commit is contained in:
parent
ca2427c29a
commit
14b2ee473a
@ -1,3 +1,5 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from tests import data, vban
|
from tests import data, vban
|
||||||
@ -11,11 +13,20 @@ class TestSetAndGetBoolHigher:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def setup_class(cls):
|
def setup_class(cls):
|
||||||
vban.apply_config("example")
|
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):
|
def test_it_tests_config_string(self):
|
||||||
assert "PhysStrip" in vban.strip[data.phys_in].label
|
assert "PhysStrip" in vban.strip[data.phys_in].label
|
||||||
assert "VirtStrip" in vban.strip[data.virt_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):
|
def test_it_tests_config_bool(self):
|
||||||
assert vban.strip[0].A1 == True
|
assert vban.strip[0].A1 == True
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import time
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from tests import data, vban
|
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])
|
@pytest.mark.parametrize("value", [0, 1])
|
||||||
class TestSetRT:
|
class TestSetRT:
|
||||||
__test__ = True
|
__test__ = True
|
||||||
@ -35,7 +29,6 @@ class TestSetRT:
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_it_sends_a_text_request(self, kls, index, param, value):
|
def test_it_sends_a_text_request(self, kls, index, param, value):
|
||||||
vban._set_rt(f"{kls}[{index}]", param, value)
|
vban._set_rt(f"{kls}[{index}].{param}", value)
|
||||||
time.sleep(0.02)
|
|
||||||
target = getattr(vban, kls)[index]
|
target = getattr(vban, kls)[index]
|
||||||
assert getattr(target, param) == bool(value)
|
assert getattr(target, param) == bool(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user