Add tests for #5286
Add tests for #5286

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