BusModes IntEnum added to bus

get() added to bus mode mixin, returns the current bus mode.

added support for setting bus mode by dict
fixed bug in apply where bool parameters weren't being applied.

bus modes added to all 3 example configs.

test_config added to unit tests.
This commit is contained in:
onyx-and-iris
2022-07-16 21:50:50 +01:00
parent a1d6cf1042
commit a86a25ca8f
5 changed files with 78 additions and 26 deletions

29
tests/test_configs.py Normal file
View File

@@ -0,0 +1,29 @@
import time
import pytest
from tests import data, tests
class TestSetAndGetBoolHigher:
__test__ = True
"""example config tests"""
@classmethod
def setup_class(cls):
tests.apply_config("example")
def test_it_tests_config_string(self):
assert "PhysStrip" in tests.strip[data.phys_in].label
assert "VirtStrip" in tests.strip[data.virt_in].label
def test_it_tests_config_bool(self):
assert tests.strip[0].A1 == True
@pytest.mark.skipif(
"not config.getoption('--run-slow')",
reason="Only run when --run-slow is given",
)
def test_it_tests_config_busmode(self):
assert tests.bus[data.phys_out].mode.get() == "composite"