diff --git a/configs/potato/example.toml b/configs/potato/example.toml index 9c43f21..b3be875 100644 --- a/configs/potato/example.toml +++ b/configs/potato/example.toml @@ -27,9 +27,6 @@ gain = -8.8 label = "VirtStrip0" A3 = true A5 = true -bass = -3.2 -mid = 1.5 -treble = 2.1 [strip-6] label = "VirtStrip1" @@ -54,9 +51,11 @@ eq = true [bus-3] label = "PhysBus3" +mode = "upmix61" [bus-4] label = "PhysBus4" +mode = "composite" [bus-5] label = "VirtBus0" diff --git a/tests/__init__.py b/tests/__init__.py index 4c10f5e..42737ba 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -43,6 +43,7 @@ data = Data() def setup_module(): print(f"\nRunning tests for kind [{data.name}]\n", file=sys.stdout) tests.login() + tests.command.reset() def teardown_module(): diff --git a/tests/pre-commit.ps1 b/tests/pre-commit.ps1 index 98394ff..0a6ade7 100644 --- a/tests/pre-commit.ps1 +++ b/tests/pre-commit.ps1 @@ -1,6 +1,6 @@ Function RunTests { $coverage = "./tests/pytest_coverage.log" - $run_tests = "pytest -v --capture=tee-sys --junitxml=./tests/.coverage.xml" + $run_tests = "pytest --run-slow -v --capture=tee-sys --junitxml=./tests/.coverage.xml" $match_pattern = "^=|^\s*$|^Running|^Using|^plugins|^collecting|^tests" if ( Test-Path $coverage ) { Clear-Content $coverage } diff --git a/tests/test_factory.py b/tests/test_factory.py new file mode 100644 index 0000000..c55bbe1 --- /dev/null +++ b/tests/test_factory.py @@ -0,0 +1,43 @@ +import pytest + +from tests import data, tests + + +class TestRemoteFactories: + __test__ = True + + @pytest.mark.skipif( + data.name != "basic", + reason="Skip test if kind is not basic", + ) + def test_it_tests_remote_attrs_for_basic(self): + assert hasattr(tests, "strip") + assert hasattr(tests, "bus") + assert hasattr(tests, "command") + + assert len(tests.strip) == 3 + assert len(tests.bus) == 2 + + @pytest.mark.skipif( + data.name != "banana", + reason="Skip test if kind is not basic", + ) + def test_it_tests_remote_attrs_for_banana(self): + assert hasattr(tests, "strip") + assert hasattr(tests, "bus") + assert hasattr(tests, "command") + + assert len(tests.strip) == 5 + assert len(tests.bus) == 5 + + @pytest.mark.skipif( + data.name != "potato", + reason="Skip test if kind is not basic", + ) + def test_it_tests_remote_attrs_for_potato(self): + assert hasattr(tests, "strip") + assert hasattr(tests, "bus") + assert hasattr(tests, "command") + + assert len(tests.strip) == 8 + assert len(tests.bus) == 8 diff --git a/tests/test_lower.py b/tests/test_lower.py index 06962d4..f52b7db 100644 --- a/tests/test_lower.py +++ b/tests/test_lower.py @@ -36,6 +36,6 @@ class TestSetRT: ) def test_it_sends_a_text_request(self, kls, index, param, value): tests._set_rt(f"{kls}[{index}]", param, value) - time.sleep(0.1) + time.sleep(0.02) target = getattr(tests, kls)[index] assert getattr(target, param) == bool(value)