mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
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))
|
||||
except ValueError:
|
||||
res[key] = m.group(key)
|
||||
return res if bool(res) else None
|
||||
return res
|
||||
|
||||
|
||||
class CordEpDiscoverParser(ShellInteractionParser):
|
||||
|
@ -49,9 +49,9 @@ RD address: {proto}://[fe80::4494:71ff:fec4:9cac]{port}
|
||||
|
||||
def test_cord_ep_parser_empty():
|
||||
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()
|
||||
assert discover_parser.parse("") is None
|
||||
assert not discover_parser.parse("")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
Loading…
Reference in New Issue
Block a user