riotctrl_shell: simplify error case for cord registration info parser
This commit is contained in:
parent
b2c8270a40
commit
382cfee1de
2
dist/pythonlibs/riotctrl_shell/cord_ep.py
vendored
2
dist/pythonlibs/riotctrl_shell/cord_ep.py
vendored
@ -69,7 +69,7 @@ class CordEpRegistrationInfoParser(ShellInteractionParser):
|
|||||||
res[key] = int(m.group(key))
|
res[key] = int(m.group(key))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
res[key] = m.group(key)
|
res[key] = m.group(key)
|
||||||
return res if bool(res) else None
|
return res
|
||||||
|
|
||||||
|
|
||||||
class CordEpDiscoverParser(ShellInteractionParser):
|
class CordEpDiscoverParser(ShellInteractionParser):
|
||||||
|
|||||||
@ -49,9 +49,9 @@ RD address: {proto}://[fe80::4494:71ff:fec4:9cac]{port}
|
|||||||
|
|
||||||
def test_cord_ep_parser_empty():
|
def test_cord_ep_parser_empty():
|
||||||
reginfo_parser = riotctrl_shell.cord_ep.CordEpRegistrationInfoParser()
|
reginfo_parser = riotctrl_shell.cord_ep.CordEpRegistrationInfoParser()
|
||||||
assert reginfo_parser.parse("") is None
|
assert not reginfo_parser.parse("")
|
||||||
discover_parser = riotctrl_shell.cord_ep.CordEpDiscoverParser()
|
discover_parser = riotctrl_shell.cord_ep.CordEpDiscoverParser()
|
||||||
assert discover_parser.parse("") is None
|
assert not discover_parser.parse("")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user