Home / Function/ test_user_error_handling() — flask Function Reference

test_user_error_handling() — flask Function Reference

Architecture documentation for the test_user_error_handling() function in test_basic.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  d4c29fe2_b0f0_4831_61d9_6f44ee1fcd7f["test_user_error_handling()"]
  85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"]
  d4c29fe2_b0f0_4831_61d9_6f44ee1fcd7f -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f
  6ea1611d_2801_3cb5_a5b9_5b6403cc0537["index()"]
  d4c29fe2_b0f0_4831_61d9_6f44ee1fcd7f -->|calls| 6ea1611d_2801_3cb5_a5b9_5b6403cc0537
  style d4c29fe2_b0f0_4831_61d9_6f44ee1fcd7f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_basic.py lines 951–964

def test_user_error_handling(app, client):
    class MyException(Exception):
        pass

    @app.errorhandler(MyException)
    def handle_my_exception(e):
        assert isinstance(e, MyException)
        return "42"

    @app.route("/")
    def index():
        raise MyException()

    assert client.get("/").data == b"42"

Subdomains

Defined In

Calls

Frequently Asked Questions

What does test_user_error_handling() do?
test_user_error_handling() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_user_error_handling() defined?
test_user_error_handling() is defined in tests/test_basic.py at line 951.
What does test_user_error_handling() call?
test_user_error_handling() calls 1 function(s): index.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free