Skip to content
Myr

Add test and changes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Diggory Blake · committed by Markus Unterwaditzer · parent 12c49c7 · Browse files · 2 files+35 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+35 added−0 removed

  • tests:+20 added−0 removed
  • other:+15 added−0 removed

2 files+35 added−0 removed

modified:tests/test_basic.py+20 added
789 unmodified lines
790 assert resp.mimetype == 'text/x-special'791 assert resp.data == b'internal server error'792793794def test_baseexception_error_handling():795 app = flask.Flask(__name__)796 app.config['LOGGER_HANDLER_POLICY'] = 'never'797798 @app.route('/')799 def broken_func():800 raise KeyboardInterrupt()801802 with app.test_client() as c:803 try:804 c.get('/')805 raise AssertionError("KeyboardInterrupt should have been raised")806 except KeyboardInterrupt:807 pass808809 ctx = flask._request_ctx_stack.top810 assert ctx.preserved811 assert type(ctx._preserved_exc) is KeyboardInterrupt812813814def test_before_request_and_routing_errors():815 app = flask.Flask(__name__)816817 @app.before_request
886 unmodified lines
modified:CHANGES+15 added
1 unmodified line
2===============34Here you can see the full list of changes between each Flask release.56Version 0.137------------89Major release, unreleased1011- Make `app.run()` into a noop if a Flask application is run from the12 development server on the command line. This avoids some behavior that13 was confusing to debug for newcomers.14- Change default configuration `JSONIFY_PRETTYPRINT_REGULAR=False`. jsonify()15 method returns compressed response by default, and pretty response in16 debug mode.17- Call `ctx.auto_pop` with the exception object instead of `None`, in the18 event that a `BaseException` such as `KeyboardInterrupt` is raised in a19 request handler.2021Version 0.12.122--------------2324Bugfix release, unreleased
602 unmodified lines