mirror of
https://github.com/ivan-usov-org/bec.git
synced 2025-04-21 10:10:02 +02:00
test: made completer test more targeted towards the completion results
This commit is contained in:
parent
5d6cc7dd05
commit
cc5503f86c
@ -40,9 +40,13 @@ finally:
|
|||||||
text=True,
|
text=True,
|
||||||
)
|
)
|
||||||
output, _ = p.communicate()
|
output, _ = p.communicate()
|
||||||
assert "bec.device_manager" in output # just one of many completions
|
|
||||||
|
# all_completions('bec.') should return a list of strings, one of which is 'bec.device_manager'
|
||||||
|
# we can therefore limit the output to lines that start with '[' and end with ']'
|
||||||
|
output_lines = [out for out in output.split("\n") if out.startswith("[") and out.endswith("]")]
|
||||||
|
assert "bec.device_manager" in output_lines[0]
|
||||||
assert (
|
assert (
|
||||||
"BECIPythonClient" not in output
|
"BECIPythonClient" not in output_lines[1]
|
||||||
) # just to ensure something we don't want is really not there
|
) # just to ensure something we don't want is really not there
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user