minor: test_failure_function: use vars (#5958)
minor: test_failure_function: use vars (#5958)

minor: test_failure_function: use vars
RonnyPfannschmidt/pytest,nicoddemus/pytest,nicoddemus/pytest,Akasurde/pytest,pytest-dev/pytest,alfredodeza/pytest,The-Compiler/pytest,markshao/pytest,The-Compiler/pytest