Add test for #5782
Add test for #5782

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