This commit is contained in:
@@ -21,7 +21,7 @@ class SubAdjustable(Adjustable):
|
|||||||
def is_moving(self):
|
def is_moving(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def test_get_adj_success(SubAdjustable):
|
def test_get_adj_success():
|
||||||
a1 = SubAdjustable("brightness", units="%", limit_low=0, limit_high=100)
|
a1 = SubAdjustable("brightness", units="%", limit_low=0, limit_high=100)
|
||||||
assert get_adj("brightness") is a1
|
assert get_adj("brightness") is a1
|
||||||
|
|
||||||
@@ -29,13 +29,13 @@ def test_get_adj_not_found(capfd):
|
|||||||
with pytest.raises(ValueError, match='could not find Adjustable with name "nonexistent"') as exc_info:
|
with pytest.raises(ValueError, match='could not find Adjustable with name "nonexistent"') as exc_info:
|
||||||
get_adj("nonexistent")
|
get_adj("nonexistent")
|
||||||
|
|
||||||
def test_ensure_adjs_mixed(SubAdjustable):
|
def test_ensure_adjs_mixed():
|
||||||
a2 = SubAdjustable("contrast", units="%", limit_low=0, limit_high=100)
|
a2 = SubAdjustable("contrast", units="%", limit_low=0, limit_high=100)
|
||||||
a3 = SubAdjustable("mid_contrast", units="%", limit_low=0, limit_high=100)
|
a3 = SubAdjustable("mid_contrast", units="%", limit_low=0, limit_high=100)
|
||||||
result = ensure_adjs([a3, "contrast"])
|
result = ensure_adjs([a3, "contrast"])
|
||||||
assert result == (a3, a2)
|
assert result == (a3, a2)
|
||||||
|
|
||||||
def test_get_adjs_filter(SubAdjustable):
|
def test_get_adjs_filter():
|
||||||
a4 = SubAdjustable("mid_brightness", units="%", limit_low=0, limit_high=100)
|
a4 = SubAdjustable("mid_brightness", units="%", limit_low=0, limit_high=100)
|
||||||
a5 = SubAdjustable("debug_internal", internal=True)
|
a5 = SubAdjustable("debug_internal", internal=True)
|
||||||
public = get_adjs()
|
public = get_adjs()
|
||||||
|
|||||||
Reference in New Issue
Block a user