Commit graph

15 commits

Author SHA1 Message Date
David Lord
19a9e95e8f clean up 2017-07-10 07:10:47 -07:00
Bijan Vakili
c1647f9468 Update documentation and regression tests to clarify that Flask.teardown_appcontext() only receives unhandled exceptions 2017-07-07 17:34:44 -07:00
Christian Stade-Schuldt
2158fe3e12 DRYing up the test suite using pytest fixtures (#2306)
* add fixtures to conftest.py

* use fixtures in test_appctx.py

* use fixtures in test_blueprints.py

* use fixtures in test_depreciations.py

* use fixtures in test_regressions.py

* use fixtures in test_reqctx.py

* use fixtures in test_templating.py

* use fixtures in test_user_error_handler.py

* use fixtures in test_views.py

* use fixtures in test_basics.py

* use fixtures in test_helpers.py

* use fixtures in test_testing.py

* update conftest.py

* make docstrings  PEP-257 compliant

* cleanup

* switch dictonary format

* use pytest parameterization for test_json_as_unicode
2017-05-23 15:18:39 -07:00
Armin Ronacher
308af2812e Improve application context popping
Exceptions during teardown handling will no longer leave application
contexts lingering around.  This fixes #1767
2016-05-26 21:46:56 +02:00
ThiefMaster
394acf2112 Add pop and setdefault to AppCtxGlobals 2015-06-20 18:04:58 +02:00
Martijn Pieters
35a1bc2f4a Switch away from using None as default value for the exception when tearing down a context.
When an exception has been handled when using the request / app context in a with statement, `sys.exc_info()` will still contain the exception information even though it has been handled already. The `__exit__` methods pass in `None` for the exception value in that case, which needs to be distinguisable from the default value for the `exc` parameter. Use a dedicated singleton sentinel value instead.
2015-03-23 15:17:19 +00:00
Parkayun
e05771ff60 Happy New Year 2015 2015-01-02 11:35:00 +09:00
Petr Zemek
0371506bf7 Change == None to is None.
PEP8 (E711) suggests that comparison to None should be `cond is None`.
2014-10-27 11:17:49 +01:00
Markus Unterwaditzer
93001352c6 Remove useless unittest imports 2014-09-21 16:47:38 +02:00
Markus Unterwaditzer
1d0b83690e Remove flask superclass 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
b33bb13c22 WIP 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
6ae0a05fce Fix assertion error 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
879becff31 Rewrite assertion methods 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
1c40e7ad49 Tests pass now. 2014-09-11 22:09:50 +02:00
Markus Unterwaditzer
2ea00e48ad Made tests recognizable 2014-09-11 22:09:50 +02:00
Renamed from tests/appctx.py (Browse further)