2023-08-07 17:39:13 +01:00
|
|
|
import time
|
|
|
|
|
2022-07-16 21:50:50 +01:00
|
|
|
import pytest
|
|
|
|
|
2023-06-25 14:23:39 +01:00
|
|
|
from tests import data, vban
|
2022-07-16 21:50:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
class TestSetAndGetBoolHigher:
|
|
|
|
__test__ = True
|
|
|
|
|
|
|
|
"""example config tests"""
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def setup_class(cls):
|
2025-01-17 15:01:40 +00:00
|
|
|
vban.apply_config('example')
|
2023-08-07 17:39:13 +01:00
|
|
|
time.sleep(0.1)
|
2022-07-16 21:50:50 +01:00
|
|
|
|
2023-08-07 17:39:13 +01:00
|
|
|
@pytest.mark.skipif(
|
|
|
|
"not config.getoption('--run-slow')",
|
2025-01-17 15:01:40 +00:00
|
|
|
reason='Only run when --run-slow is given',
|
2023-08-07 17:39:13 +01:00
|
|
|
)
|
2022-07-16 21:50:50 +01:00
|
|
|
def test_it_tests_config_string(self):
|
2025-01-17 15:01:40 +00:00
|
|
|
assert 'PhysStrip' in vban.strip[data.phys_in].label
|
|
|
|
assert 'VirtStrip' in vban.strip[data.virt_in].label
|
2022-07-16 21:50:50 +01:00
|
|
|
|
2023-08-07 17:39:13 +01:00
|
|
|
@pytest.mark.skipif(
|
|
|
|
"not config.getoption('--run-slow')",
|
2025-01-17 15:01:40 +00:00
|
|
|
reason='Only run when --run-slow is given',
|
2023-08-07 17:39:13 +01:00
|
|
|
)
|
2022-07-16 21:50:50 +01:00
|
|
|
def test_it_tests_config_bool(self):
|
2025-01-17 15:01:40 +00:00
|
|
|
assert vban.strip[0].A1
|
2022-07-16 21:50:50 +01:00
|
|
|
|
|
|
|
@pytest.mark.skipif(
|
|
|
|
"not config.getoption('--run-slow')",
|
2025-01-17 15:01:40 +00:00
|
|
|
reason='Only run when --run-slow is given',
|
2022-07-16 21:50:50 +01:00
|
|
|
)
|
|
|
|
def test_it_tests_config_busmode(self):
|
2025-01-17 15:01:40 +00:00
|
|
|
assert vban.bus[data.phys_out].mode.get() == 'composite'
|