mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 02:20:48 +00:00
fixes error with escape character in regex
This commit is contained in:
parent
753714b639
commit
36692d1bc7
@ -1,3 +1,5 @@
|
||||
import re
|
||||
|
||||
import pytest
|
||||
|
||||
import vban_cmd
|
||||
@ -15,16 +17,15 @@ class TestErrors:
|
||||
vban_cmd.api("unknown_kind")
|
||||
|
||||
def test_it_tests_an_unknown_config_name(self):
|
||||
EXPECTED_MSG = (
|
||||
EXPECTED_MSG = "\n".join(
|
||||
(
|
||||
f"No config with name 'unknown' is loaded into memory",
|
||||
f"Known configs: {list(vban.configs.keys())}",
|
||||
)
|
||||
with pytest.raises(vban_cmd.error.VBANCMDError) as exc_info:
|
||||
)
|
||||
with pytest.raises(vban_cmd.error.VBANCMDError, match=re.escape(EXPECTED_MSG)):
|
||||
vban.apply_config("unknown")
|
||||
|
||||
e = exc_info.value
|
||||
assert e.message == "\n".join(EXPECTED_MSG)
|
||||
|
||||
def test_it_tests_an_invalid_config_key(self):
|
||||
CONFIG = {
|
||||
"strip-0": {"A1": True, "B1": True, "gain": -6.0},
|
||||
|
Loading…
Reference in New Issue
Block a user