flask icon indicating copy to clipboard operation
flask copied to clipboard

test_werkzeug_passthrough_errors records passthrough_errors but never asserts on it

Open jeffev opened this issue 1 month ago • 1 comments

tests/test_basic.py::test_werkzeug_passthrough_errors mocks werkzeug.serving.run_simple and stores kwargs.get("passthrough_errors") in rv, but nothing reads rv afterwards. Across its 24 parametrized cases it only checks that app.run() doesn't raise.

As far as I can see, Flask.run no longer sets passthrough_errors itself (it passes **options through), so the original assertion may have been dropped when that logic was removed. Should the test assert that passthrough_errors is not set unless the caller passes it (and that it's forwarded when they do), or be removed? I can send a PR for whichever you prefer.

(Found with hollowtest, a checker for tests that cannot fail.)

jeffev avatar Nov 01 '26 00:11 jeffev

https://palletsprojects.com/contributing/llm-ai

davidism avatar Nov 01 '26 01:11 davidism