mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-04-18 04:53:31 +00:00
test against localhost
run tests through formatter remove sel test from bus bool params
This commit is contained in:
@@ -3,7 +3,7 @@ import re
|
||||
import pytest
|
||||
|
||||
import vban_cmd
|
||||
from tests import data, vban
|
||||
from tests import vban
|
||||
|
||||
|
||||
class TestErrors:
|
||||
@@ -12,26 +12,26 @@ class TestErrors:
|
||||
def test_it_tests_an_unknown_kind(self):
|
||||
with pytest.raises(
|
||||
vban_cmd.error.VBANCMDError,
|
||||
match=f"Unknown Voicemeeter kind 'unknown_kind'",
|
||||
match="Unknown Voicemeeter kind 'unknown_kind'",
|
||||
):
|
||||
vban_cmd.api("unknown_kind")
|
||||
vban_cmd.api('unknown_kind')
|
||||
|
||||
def test_it_tests_an_unknown_config_name(self):
|
||||
EXPECTED_MSG = "\n".join(
|
||||
EXPECTED_MSG = '\n'.join(
|
||||
(
|
||||
f"No config with name 'unknown' is loaded into memory",
|
||||
f"Known configs: {list(vban.configs.keys())}",
|
||||
"No config with name 'unknown' is loaded into memory",
|
||||
f'Known configs: {list(vban.configs.keys())}',
|
||||
)
|
||||
)
|
||||
with pytest.raises(vban_cmd.error.VBANCMDError, match=re.escape(EXPECTED_MSG)):
|
||||
vban.apply_config("unknown")
|
||||
vban.apply_config('unknown')
|
||||
|
||||
def test_it_tests_an_invalid_config_key(self):
|
||||
CONFIG = {
|
||||
"strip-0": {"A1": True, "B1": True, "gain": -6.0},
|
||||
"bus-0": {"mute": True, "eq": {"on": True}},
|
||||
"unknown-0": {"state": True},
|
||||
"vban-out-1": {"name": "streamname"},
|
||||
'strip-0': {'A1': True, 'B1': True, 'gain': -6.0},
|
||||
'bus-0': {'mute': True, 'eq': {'on': True}},
|
||||
'unknown-0': {'state': True},
|
||||
'vban-out-1': {'name': 'streamname'},
|
||||
}
|
||||
with pytest.raises(ValueError, match="invalid config key 'unknown-0'"):
|
||||
vban.apply(CONFIG)
|
||||
|
||||
Reference in New Issue
Block a user