mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2024-11-15 17:40:57 +00:00
mute prop added to dca class
mute tests added patch bump
This commit is contained in:
parent
e7d38bb9d7
commit
a09b07e1c2
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "xair-api"
|
||||
version = "2.2.0"
|
||||
version = "2.2.1"
|
||||
description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
|
||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||
license = "MIT"
|
||||
|
@ -5,6 +5,23 @@ from tests.x32 import data, tests
|
||||
""" STRIP TESTS """
|
||||
|
||||
|
||||
class TestSetAndGetStripMuteHigher:
|
||||
"""Mute"""
|
||||
|
||||
__test__ = True
|
||||
|
||||
def setup_class(self):
|
||||
self.target = getattr(tests, "strip")[data.strip]
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"param,value",
|
||||
[("mute", True), ("mute", False)],
|
||||
)
|
||||
def test_it_sets_and_gets_strip_mute_bool_params(self, param, value):
|
||||
setattr(self.target, param, value)
|
||||
assert getattr(self.target, param) == value
|
||||
|
||||
|
||||
class TestSetAndGetStripMixHigher:
|
||||
"""Mix"""
|
||||
|
||||
|
@ -106,6 +106,23 @@ class TestSetAndGetLRGEQHigher:
|
||||
""" STRIP TESTS """
|
||||
|
||||
|
||||
class TestSetAndGetStripMuteHigher:
|
||||
"""Mute"""
|
||||
|
||||
__test__ = True
|
||||
|
||||
def setup_class(self):
|
||||
self.target = getattr(tests, "strip")[data.strip]
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"param,value",
|
||||
[("mute", True), ("mute", False)],
|
||||
)
|
||||
def test_it_sets_and_gets_strip_mute_bool_params(self, param, value):
|
||||
setattr(self.target, param, value)
|
||||
assert getattr(self.target, param) == value
|
||||
|
||||
|
||||
class TestSetAndGetStripMixHigher:
|
||||
"""Mix"""
|
||||
|
||||
|
@ -37,6 +37,14 @@ class DCA(IDCA):
|
||||
def on(self, val: bool):
|
||||
self.setter("on", 1 if val else 0)
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.on = not val
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.getter("config/name")[0]
|
||||
|
Loading…
Reference in New Issue
Block a user