code: def test_app_tearing_down_with_unhandled_exception(app, client):
      app.config["PROPAGATE_EXCEPTIONS"] = True
      cleanup_stuff = []
  
      @app.teardown_appcontext
      def cleanup(exception):
          cleanup_stuff.append(exception)
  
      @app.route("/")
      def index():
          raise ValueError("dummy")
  
      with pytest.raises(ValueError, match="dummy"):
          with app.app_context():
              client.get("/")
  
      assert len(cleanup_stuff) == 1
      assert isinstance(cleanup_stuff[0], ValueError)
      assert str(cleanup_stuff[0]) == "dummy"
  
file_path: flask/tests/test_appctx.py
imports: import pytest
  import flask
  from flask.globals import app_ctx
  from flask.globals import request_ctx
label_desc: Use image node_id 10 for calling a global function with example usage: test_app_tearing_down_with_unhandled_exception(app, client) without return types