Conversation
test/t/test_kill.py
Outdated
| completion # more than one starting with 1 | ||
| or completion.endswith(" ") # pid 1 only |
There was a problem hiding this comment.
This has a code smell to me -- would have expected completion to be ["1"] offhand when the only completion is 1 and thus completion to be truthy. But I've forgotten about the dirty details, maybe this is how it should be done.
There was a problem hiding this comment.
I think completion contains the added suffix for a unique completion. In this case, completion == " " should be more specific.
There was a problem hiding this comment.
That doesn't work though, CompletionResult's __eq__ would make that compare against [" "] and fail, while the endswith test works.
There was a problem hiding this comment.
Ah, sorry. I meant completion.output == " ". We already use .output In multiple places.
There was a problem hiding this comment.
Ah right, that's better, switched in 13ee6e3...8ccf9da.
Reproducible e.g. by starting our test centos7 container in interactive mode, and then immediately `pytest test/t/test_kill.py` in it. Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
Reproducible e.g. by starting our test centos7 container in interactive mode, and then immediately
pytest test/t/test_kill.pyin it.