diff --git a/tests/__init__.py b/tests/__init__.py index 3e5793f..e109362 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -3,15 +3,13 @@ import sys from dataclasses import dataclass import voicemeeterlib -from voicemeeterlib.kinds import KindId, kinds_all +from voicemeeterlib.kinds import KindId from voicemeeterlib.kinds import request_kind_map as kindmap # let's keep things random -kind_id = random.choice(tuple(kind_id.name.lower() for kind_id in KindId)) - -vmrs = {kind.name: voicemeeterlib.api(kind.name) for kind in kinds_all} -tests = vmrs[kind_id] -kind = kindmap(kind_id) +KIND_ID = random.choice(tuple(kind_id.name.lower() for kind_id in KindId)) +vm = voicemeeterlib.api(KIND_ID) +kind = kindmap(KIND_ID) @dataclass @@ -42,9 +40,9 @@ data = Data() def setup_module(): print(f"\nRunning tests for kind [{data.name}]\n", file=sys.stdout) - tests.login() - tests.command.reset() + vm.login() + vm.command.reset() def teardown_module(): - tests.logout() + vm.logout() diff --git a/tests/test_configs.py b/tests/test_configs.py index 6b4ce6b..836ca68 100644 --- a/tests/test_configs.py +++ b/tests/test_configs.py @@ -1,36 +1,48 @@ -import time - import pytest -from tests import data, tests +from tests import data, vm class TestUserConfigs: __test__ = True - """example config tests""" + """example config vm""" @classmethod def setup_class(cls): - tests.apply_config("example") + vm.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 - assert "PhysBus" in tests.bus[data.phys_out].label - assert "VirtBus" in tests.bus[data.virt_out].label + def test_it_vm_config_string(self): + assert "PhysStrip" in vm.strip[data.phys_in].label + assert "VirtStrip" in vm.strip[data.virt_in].label + assert "PhysBus" in vm.bus[data.phys_out].label + assert "VirtBus" in vm.bus[data.virt_out].label - def test_it_tests_config_bool(self): - assert tests.strip[0].A1 == True + def test_it_vm_config_bool(self): + assert vm.strip[0].A1 == True + + @pytest.mark.skipif( + data.name != "potato", + reason="Skip test if kind is not potato", + ) + def test_it_vm_config_bool_strip_eq_on(self): + assert vm.strip[data.phys_in].eq.on == True + + @pytest.mark.skipif( + data.name != "banana", + reason="Skip test if kind is not banana", + ) + def test_it_vm_config_bool_bus_eq_ab(self): + assert vm.bus[data.phys_out].eq.ab == 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" + def test_it_vm_config_busmode(self): + assert vm.bus[data.phys_out].mode.get() == "composite" - def test_it_tests_config_bass_med_high(self): - assert tests.strip[data.virt_in].bass == -3.2 - assert tests.strip[data.virt_in].mid == 1.5 - assert tests.strip[data.virt_in].high == 2.1 + def test_it_vm_config_bass_med_high(self): + assert vm.strip[data.virt_in].bass == -3.2 + assert vm.strip[data.virt_in].mid == 1.5 + assert vm.strip[data.virt_in].high == 2.1 diff --git a/tests/test_factory.py b/tests/test_factory.py index b961ac5..aa9465a 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -1,6 +1,6 @@ import pytest -from tests import data, tests +from tests import data, vm class TestRemoteFactories: @@ -10,57 +10,57 @@ class TestRemoteFactories: 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 hasattr(tests, "button") - assert hasattr(tests, "vban") - assert hasattr(tests, "device") - assert hasattr(tests, "option") + def test_it_vm_remote_attrs_for_basic(self): + assert hasattr(vm, "strip") + assert hasattr(vm, "bus") + assert hasattr(vm, "command") + assert hasattr(vm, "button") + assert hasattr(vm, "vban") + assert hasattr(vm, "device") + assert hasattr(vm, "option") - assert len(tests.strip) == 3 - assert len(tests.bus) == 2 - assert len(tests.button) == 80 - assert len(tests.vban.instream) == 4 and len(tests.vban.outstream) == 4 + assert len(vm.strip) == 3 + assert len(vm.bus) == 2 + assert len(vm.button) == 80 + assert len(vm.vban.instream) == 4 and len(vm.vban.outstream) == 4 @pytest.mark.skipif( data.name != "banana", reason="Skip test if kind is not banana", ) - def test_it_tests_remote_attrs_for_banana(self): - assert hasattr(tests, "strip") - assert hasattr(tests, "bus") - assert hasattr(tests, "command") - assert hasattr(tests, "button") - assert hasattr(tests, "vban") - assert hasattr(tests, "device") - assert hasattr(tests, "option") - assert hasattr(tests, "recorder") - assert hasattr(tests, "patch") + def test_it_vm_remote_attrs_for_banana(self): + assert hasattr(vm, "strip") + assert hasattr(vm, "bus") + assert hasattr(vm, "command") + assert hasattr(vm, "button") + assert hasattr(vm, "vban") + assert hasattr(vm, "device") + assert hasattr(vm, "option") + assert hasattr(vm, "recorder") + assert hasattr(vm, "patch") - assert len(tests.strip) == 5 - assert len(tests.bus) == 5 - assert len(tests.button) == 80 - assert len(tests.vban.instream) == 8 and len(tests.vban.outstream) == 8 + assert len(vm.strip) == 5 + assert len(vm.bus) == 5 + assert len(vm.button) == 80 + assert len(vm.vban.instream) == 8 and len(vm.vban.outstream) == 8 @pytest.mark.skipif( data.name != "potato", reason="Skip test if kind is not potato", ) - def test_it_tests_remote_attrs_for_potato(self): - assert hasattr(tests, "strip") - assert hasattr(tests, "bus") - assert hasattr(tests, "command") - assert hasattr(tests, "button") - assert hasattr(tests, "vban") - assert hasattr(tests, "device") - assert hasattr(tests, "option") - assert hasattr(tests, "recorder") - assert hasattr(tests, "patch") - assert hasattr(tests, "fx") + def test_it_vm_remote_attrs_for_potato(self): + assert hasattr(vm, "strip") + assert hasattr(vm, "bus") + assert hasattr(vm, "command") + assert hasattr(vm, "button") + assert hasattr(vm, "vban") + assert hasattr(vm, "device") + assert hasattr(vm, "option") + assert hasattr(vm, "recorder") + assert hasattr(vm, "patch") + assert hasattr(vm, "fx") - assert len(tests.strip) == 8 - assert len(tests.bus) == 8 - assert len(tests.button) == 80 - assert len(tests.vban.instream) == 8 and len(tests.vban.outstream) == 8 + assert len(vm.strip) == 8 + assert len(vm.bus) == 8 + assert len(vm.button) == 80 + assert len(vm.vban.instream) == 8 and len(vm.vban.outstream) == 8 diff --git a/tests/test_higher.py b/tests/test_higher.py index 64c97ec..4f5ad35 100644 --- a/tests/test_higher.py +++ b/tests/test_higher.py @@ -1,6 +1,6 @@ import pytest -from tests import data, tests +from tests import data, vm @pytest.mark.parametrize("value", [False, True]) @@ -19,23 +19,54 @@ class TestSetAndGetBoolHigher: ], ) def test_it_sets_and_gets_strip_bool_params(self, index, param, value): - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value + + """ strip EQ tests, physical """ + + @pytest.mark.skipif( + data.name != "potato", + reason="Skip test if kind is not potato", + ) + @pytest.mark.parametrize( + "index,param", + [ + (data.phys_in, "on"), + (data.phys_in, "ab"), + ], + ) + def test_it_sets_and_gets_strip_eq_bool_params(self, index, param, value): + assert hasattr(vm.strip[index].eq, param) + setattr(vm.strip[index].eq, param, value) + assert getattr(vm.strip[index].eq, param) == value """ bus tests, physical and virtual """ @pytest.mark.parametrize( "index,param", [ - (data.phys_out, "eq"), (data.phys_out, "mute"), - (data.virt_out, "eq_ab"), (data.virt_out, "sel"), ], ) def test_it_sets_and_gets_bus_bool_params(self, index, param, value): - setattr(tests.bus[index], param, value) - assert getattr(tests.bus[index], param) == value + assert hasattr(vm.bus[index], param) + setattr(vm.bus[index], param, value) + assert getattr(vm.bus[index], param) == value + + """ bus EQ tests, physical and virtual """ + + @pytest.mark.parametrize( + "index,param", + [ + (data.phys_out, "on"), + (data.virt_out, "ab"), + ], + ) + def test_it_sets_and_gets_bus_eq_bool_params(self, index, param, value): + assert hasattr(vm.bus[index].eq, param) + setattr(vm.bus[index].eq, param, value) + assert getattr(vm.bus[index].eq, param) == value """ bus modes tests, physical and virtual """ @@ -53,8 +84,8 @@ class TestSetAndGetBoolHigher: ], ) def test_it_sets_and_gets_busmode_basic_bool_params(self, index, param, value): - setattr(tests.bus[index].mode, param, value) - assert getattr(tests.bus[index].mode, param) == value + setattr(vm.bus[index].mode, param, value) + assert getattr(vm.bus[index].mode, param) == value @pytest.mark.skipif( data.name == "basic", @@ -72,8 +103,8 @@ class TestSetAndGetBoolHigher: ], ) def test_it_sets_and_gets_busmode_bool_params(self, index, param, value): - setattr(tests.bus[index].mode, param, value) - assert getattr(tests.bus[index].mode, param) == value + setattr(vm.bus[index].mode, param, value) + assert getattr(vm.bus[index].mode, param) == value """ macrobutton tests """ @@ -82,8 +113,8 @@ class TestSetAndGetBoolHigher: [(data.button_lower, "state"), (data.button_upper, "trigger")], ) def test_it_sets_and_gets_macrobutton_bool_params(self, index, param, value): - setattr(tests.button[index], param, value) - assert getattr(tests.button[index], param) == value + setattr(vm.button[index], param, value) + assert getattr(vm.button[index], param) == value """ vban instream tests """ @@ -92,8 +123,8 @@ class TestSetAndGetBoolHigher: [(data.vban_in, "on")], ) def test_it_sets_and_gets_vban_instream_bool_params(self, index, param, value): - setattr(tests.vban.instream[index], param, value) - assert getattr(tests.vban.instream[index], param) == value + setattr(vm.vban.instream[index], param, value) + assert getattr(vm.vban.instream[index], param) == value """ vban outstream tests """ @@ -102,8 +133,8 @@ class TestSetAndGetBoolHigher: [(data.vban_out, "on")], ) def test_it_sets_and_gets_vban_outstream_bool_params(self, index, param, value): - setattr(tests.vban.outstream[index], param, value) - assert getattr(tests.vban.outstream[index], param) == value + setattr(vm.vban.outstream[index], param, value) + assert getattr(vm.vban.outstream[index], param) == value """ command tests """ @@ -112,7 +143,7 @@ class TestSetAndGetBoolHigher: [("lock")], ) def test_it_sets_command_bool_params(self, param, value): - setattr(tests.command, param, value) + setattr(vm.command, param, value) """ recorder tests """ @@ -125,8 +156,8 @@ class TestSetAndGetBoolHigher: [("A1"), ("B2")], ) def test_it_sets_and_gets_recorder_bool_params(self, param, value): - setattr(tests.recorder, param, value) - assert getattr(tests.recorder, param) == value + setattr(vm.recorder, param, value) + assert getattr(vm.recorder, param) == value @pytest.mark.skipif( data.name == "basic", @@ -137,7 +168,7 @@ class TestSetAndGetBoolHigher: [("loop")], ) def test_it_sets_recorder_bool_params(self, param, value): - setattr(tests.recorder, param, value) + setattr(vm.recorder, param, value) """ fx tests """ @@ -150,8 +181,8 @@ class TestSetAndGetBoolHigher: [("reverb"), ("reverb_ab"), ("delay"), ("delay_ab")], ) def test_it_sets_and_gets_fx_bool_params(self, param, value): - setattr(tests.fx, param, value) - assert getattr(tests.fx, param) == value + setattr(vm.fx, param, value) + assert getattr(vm.fx, param) == value """ patch tests """ @@ -164,8 +195,8 @@ class TestSetAndGetBoolHigher: [("postfadercomposite")], ) def test_it_sets_and_gets_patch_bool_params(self, param, value): - setattr(tests.patch, param, value) - assert getattr(tests.patch, param) == value + setattr(vm.patch, param, value) + assert getattr(vm.patch, param) == value """ patch.insert tests """ @@ -178,8 +209,8 @@ class TestSetAndGetBoolHigher: [(data.insert_lower, "on"), (data.insert_higher, "on")], ) def test_it_sets_and_gets_patch_insert_bool_params(self, index, param, value): - setattr(tests.patch.insert[index], param, value) - assert getattr(tests.patch.insert[index], param) == value + setattr(vm.patch.insert[index], param, value) + assert getattr(vm.patch.insert[index], param) == value """ option tests """ @@ -188,8 +219,8 @@ class TestSetAndGetBoolHigher: [("monitoronsel")], ) def test_it_sets_and_gets_option_bool_params(self, param, value): - setattr(tests.option, param, value) - assert getattr(tests.option, param) == value + setattr(vm.option, param, value) + assert getattr(vm.option, param) == value class TestSetAndGetIntHigher: @@ -207,8 +238,8 @@ class TestSetAndGetIntHigher: ], ) def test_it_sets_and_gets_strip_bool_params(self, index, param, value): - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value """ vban outstream tests """ @@ -217,8 +248,8 @@ class TestSetAndGetIntHigher: [(data.vban_out, "sr", 48000)], ) def test_it_sets_and_gets_vban_outstream_bool_params(self, index, param, value): - setattr(tests.vban.outstream[index], param, value) - assert getattr(tests.vban.outstream[index], param) == value + setattr(vm.vban.outstream[index], param, value) + assert getattr(vm.vban.outstream[index], param) == value """ patch.asio tests """ @@ -234,8 +265,8 @@ class TestSetAndGetIntHigher: ], ) def test_it_sets_and_gets_patch_asio_in_int_params(self, index, value): - tests.patch.asio[index].set(value) - assert tests.patch.asio[index].get() == value + vm.patch.asio[index].set(value) + assert vm.patch.asio[index].get() == value """ patch.A2[i]-A5[i] tests """ @@ -251,10 +282,10 @@ class TestSetAndGetIntHigher: ], ) def test_it_sets_and_gets_patch_asio_out_int_params(self, index, value): - tests.patch.A2[index].set(value) - assert tests.patch.A2[index].get() == value - tests.patch.A5[index].set(value) - assert tests.patch.A5[index].get() == value + vm.patch.A2[index].set(value) + assert vm.patch.A2[index].get() == value + vm.patch.A5[index].set(value) + assert vm.patch.A5[index].get() == value """ patch.composite tests """ @@ -272,8 +303,8 @@ class TestSetAndGetIntHigher: ], ) def test_it_sets_and_gets_patch_composite_int_params(self, index, value): - tests.patch.composite[index].set(value) - assert tests.patch.composite[index].get() == value + vm.patch.composite[index].set(value) + assert vm.patch.composite[index].get() == value """ option tests """ @@ -289,8 +320,8 @@ class TestSetAndGetIntHigher: ], ) def test_it_sets_and_gets_patch_delay_int_params(self, index, value): - tests.option.delay[index].set(value) - assert tests.option.delay[index].get() == value + vm.option.delay[index].set(value) + assert vm.option.delay[index].get() == value class TestSetAndGetFloatHigher: @@ -303,29 +334,25 @@ class TestSetAndGetFloatHigher: [ (data.phys_in, "gain", -3.6), (data.virt_in, "gain", 5.8), - (data.phys_in, "comp", 0.0), - (data.virt_in, "comp", 8.2), - (data.phys_in, "gate", 2.3), - (data.virt_in, "gate", 6.7), ], ) def test_it_sets_and_gets_strip_float_params(self, index, param, value): - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value @pytest.mark.parametrize( "index,value", [(data.phys_in, 2), (data.phys_in, 2), (data.virt_in, 8), (data.virt_in, 8)], ) def test_it_gets_prefader_levels_and_compares_length_of_array(self, index, value): - assert len(tests.strip[index].levels.prefader) == value + assert len(vm.strip[index].levels.prefader) == value @pytest.mark.parametrize( "index,value", [(data.phys_in, 2), (data.phys_in, 2), (data.virt_in, 8), (data.virt_in, 8)], ) def test_it_gets_postmute_levels_and_compares_length_of_array(self, index, value): - assert len(tests.strip[index].levels.postmute) == value + assert len(vm.strip[index].levels.postmute) == value @pytest.mark.skipif( data.name != "potato", @@ -341,8 +368,8 @@ class TestSetAndGetFloatHigher: ], ) def test_it_sets_and_gets_strip_gainlayer_values(self, index, j, value): - tests.strip[index].gainlayer[j].gain = value - assert tests.strip[index].gainlayer[j].gain == value + vm.strip[index].gainlayer[j].gain = value + assert vm.strip[index].gainlayer[j].gain == value """ strip tests, physical """ @@ -356,9 +383,9 @@ class TestSetAndGetFloatHigher: ], ) def test_it_sets_and_gets_strip_xy_params(self, index, param, value): - assert hasattr(tests.strip[index], param) - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + assert hasattr(vm.strip[index], param) + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value @pytest.mark.skipif( data.name != "potato", @@ -372,9 +399,55 @@ class TestSetAndGetFloatHigher: ], ) def test_it_sets_and_gets_strip_effects_params(self, index, param, value): - assert hasattr(tests.strip[index], param) - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + assert hasattr(vm.strip[index], param) + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value + + @pytest.mark.skipif( + data.name != "potato", + reason="Only test if logged into Potato version", + ) + @pytest.mark.parametrize( + "index, param, value", + [ + (data.phys_in, "gainin", -8.6), + (data.phys_in, "knee", 0.5), + ], + ) + def test_it_sets_and_gets_strip_comp_params(self, index, param, value): + assert hasattr(vm.strip[index].comp, param) + setattr(vm.strip[index].comp, param, value) + assert getattr(vm.strip[index].comp, param) == value + + @pytest.mark.skipif( + data.name != "potato", + reason="Only test if logged into Potato version", + ) + @pytest.mark.parametrize( + "index, param, value", + [ + (data.phys_in, "bpsidechain", 120), + (data.phys_in, "hold", 3000), + ], + ) + def test_it_sets_and_gets_strip_gate_params(self, index, param, value): + assert hasattr(vm.strip[index].gate, param) + setattr(vm.strip[index].gate, param, value) + assert getattr(vm.strip[index].gate, param) == value + + @pytest.mark.skipif( + data.name != "potato", + reason="Only test if logged into Potato version", + ) + @pytest.mark.parametrize( + "index, param, value", + [ + (data.phys_in, "knob", -8.6), + ], + ) + def test_it_sets_and_gets_strip_denoiser_params(self, index, param, value): + setattr(vm.strip[index].denoiser, param, value) + assert getattr(vm.strip[index].denoiser, param) == value """ strip tests, virtual """ @@ -389,8 +462,8 @@ class TestSetAndGetFloatHigher: ], ) def test_it_sets_and_gets_strip_eq_params(self, index, param, value): - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value """ bus tests, physical and virtual """ @@ -403,24 +476,24 @@ class TestSetAndGetFloatHigher: [(data.phys_out, "returnreverb", 3.6), (data.virt_out, "returnfx1", 5.8)], ) def test_it_sets_and_gets_bus_effects_float_params(self, index, param, value): - assert hasattr(tests.bus[index], param) - setattr(tests.bus[index], param, value) - assert getattr(tests.bus[index], param) == value + assert hasattr(vm.bus[index], param) + setattr(vm.bus[index], param, value) + assert getattr(vm.bus[index], param) == value @pytest.mark.parametrize( "index, param, value", [(data.phys_out, "gain", -3.6), (data.virt_out, "gain", 5.8)], ) def test_it_sets_and_gets_bus_float_params(self, index, param, value): - setattr(tests.bus[index], param, value) - assert getattr(tests.bus[index], param) == value + setattr(vm.bus[index], param, value) + assert getattr(vm.bus[index], param) == value @pytest.mark.parametrize( "index,value", [(data.phys_out, 8), (data.virt_out, 8)], ) def test_it_gets_prefader_levels_and_compares_length_of_array(self, index, value): - assert len(tests.bus[index].levels.all) == value + assert len(vm.bus[index].levels.all) == value @pytest.mark.parametrize("value", ["test0", "test1"]) @@ -434,8 +507,8 @@ class TestSetAndGetStringHigher: [(data.phys_in, "label"), (data.virt_in, "label")], ) def test_it_sets_and_gets_strip_string_params(self, index, param, value): - setattr(tests.strip[index], param, value) - assert getattr(tests.strip[index], param) == value + setattr(vm.strip[index], param, value) + assert getattr(vm.strip[index], param) == value """ bus tests, physical and virtual """ @@ -444,8 +517,8 @@ class TestSetAndGetStringHigher: [(data.phys_out, "label"), (data.virt_out, "label")], ) def test_it_sets_and_gets_bus_string_params(self, index, param, value): - setattr(tests.bus[index], param, value) - assert getattr(tests.bus[index], param) == value + setattr(vm.bus[index], param, value) + assert getattr(vm.bus[index], param) == value """ vban instream tests """ @@ -454,8 +527,8 @@ class TestSetAndGetStringHigher: [(data.vban_in, "name")], ) def test_it_sets_and_gets_vban_instream_string_params(self, index, param, value): - setattr(tests.vban.instream[index], param, value) - assert getattr(tests.vban.instream[index], param) == value + setattr(vm.vban.instream[index], param, value) + assert getattr(vm.vban.instream[index], param) == value """ vban outstream tests """ @@ -464,8 +537,8 @@ class TestSetAndGetStringHigher: [(data.vban_out, "name")], ) def test_it_sets_and_gets_vban_outstream_string_params(self, index, param, value): - setattr(tests.vban.outstream[index], param, value) - assert getattr(tests.vban.outstream[index], param) == value + setattr(vm.vban.outstream[index], param, value) + assert getattr(vm.vban.outstream[index], param) == value @pytest.mark.parametrize("value", [False, True]) @@ -486,5 +559,5 @@ class TestSetAndGetMacroButtonHigher: ], ) def test_it_sets_and_gets_macrobutton_params(self, index, param, value): - setattr(tests.button[index], param, value) - assert getattr(tests.button[index], param) == value + setattr(vm.button[index], param, value) + assert getattr(vm.button[index], param) == value diff --git a/tests/test_lower.py b/tests/test_lower.py index b6a4072..6da88bf 100644 --- a/tests/test_lower.py +++ b/tests/test_lower.py @@ -1,6 +1,6 @@ import pytest -from tests import data, tests +from tests import data, vm class TestSetAndGetFloatLower: @@ -18,8 +18,8 @@ class TestSetAndGetFloatLower: ], ) def test_it_sets_and_gets_mute_eq_float_params(self, param, value): - tests.set(param, value) - assert (round(tests.get(param))) == value + vm.set(param, value) + assert (round(vm.get(param))) == value @pytest.mark.parametrize( "param,value", @@ -30,8 +30,8 @@ class TestSetAndGetFloatLower: ], ) def test_it_sets_and_gets_comp_gain_float_params(self, param, value): - tests.set(param, value) - assert (round(tests.get(param), 1)) == value + vm.set(param, value) + assert (round(vm.get(param), 1)) == value @pytest.mark.parametrize("value", ["test0", "test1"]) @@ -45,12 +45,14 @@ class TestSetAndGetStringLower: [(f"Strip[{data.phys_out}].label"), (f"Bus[{data.virt_out}].label")], ) def test_it_sets_and_gets_string_params(self, param, value): - tests.set(param, value) - assert tests.get(param, string=True) == value + vm.set(param, value) + assert vm.get(param, string=True) == value @pytest.mark.parametrize("value", [0, 1]) class TestMacroButtonsLower: + __test__ = True + """VBVMR_MacroButton_SetStatus, VBVMR_MacroButton_GetStatus""" @pytest.mark.parametrize( @@ -58,21 +60,21 @@ class TestMacroButtonsLower: [(33, 1), (49, 1)], ) def test_it_sets_and_gets_macrobuttons_state(self, index, mode, value): - tests.set_buttonstatus(index, value, mode) - assert tests.get_buttonstatus(index, mode) == value + vm.set_buttonstatus(index, value, mode) + assert vm.get_buttonstatus(index, mode) == value @pytest.mark.parametrize( "index, mode", [(14, 2), (12, 2)], ) def test_it_sets_and_gets_macrobuttons_stateonly(self, index, mode, value): - tests.set_buttonstatus(index, value, mode) - assert tests.get_buttonstatus(index, mode) == value + vm.set_buttonstatus(index, value, mode) + assert vm.get_buttonstatus(index, mode) == value @pytest.mark.parametrize( "index, mode", [(50, 3), (65, 3)], ) def test_it_sets_and_gets_macrobuttons_trigger(self, index, mode, value): - tests.set_buttonstatus(index, value, mode) - assert tests.get_buttonstatus(index, mode) == value + vm.set_buttonstatus(index, value, mode) + assert vm.get_buttonstatus(index, mode) == value