tests: unittest: fix/harden "test_exit_outcome"
tests: unittest: fix/harden "test_exit_outcome"

Ref: https://github.com/pytest-dev/pytest/pull/5634#pullrequestreview-265565917

tomviner/pytest,nicoddemus/pytest,The-Compiler/pytest,Akasurde/pytest,The-Compiler/pytest,RonnyPfannschmidt/pytest,tomviner/pytest,markshao/pytest,nicoddemus/pytest,alfredodeza/pytest,pytest-dev/pytest