Commit Graph

30 Commits

Author SHA1 Message Date
David Lord c2705ffd9c
merge app and request context 2025-09-19 16:43:53 -07:00
David Lord 54ff9b2972
use ruff linter and formatter 2023-11-09 10:27:01 -08:00
David Lord 261e4a6cf2
fix flake8 bugbear errors 2023-01-18 10:32:51 -08:00
David Lord 82c2e0366c
remove uses of LocalStack 2022-07-08 11:13:09 -07:00
David Lord ef6c2b9e4a
clean up pytest.raises tests 2022-04-28 09:32:31 -07:00
David Lord f2f027d1fb
remove unused module docstrings 2020-04-04 12:28:08 -07:00
David Lord 524fd0bc8c
apply pyupgrade 2020-04-04 12:10:00 -07:00
David Lord 1351d0a565
Merge branch '1.0.x' 2019-06-23 16:57:52 -07:00
David Lord e666f7a69c
standardize license and copyright 2019-06-22 13:09:09 -07:00
David Lord 43483683b2
apply reorder-python-imports pre-commit config 2019-06-01 09:07:20 -07:00
David Baumgold 025589ee76 Reformat with black
https://github.com/python/black
2019-05-06 16:28:58 -04:00
Dilan Coss 8fa3ed13bf details fixed 2018-05-29 09:51:08 -06:00
Dilan Coss 8cdd01ea5d Test added for _AppCtxGlobals __repr__ method 2018-05-28 23:49:06 -06:00
David Lord 5f42989ce3
don't use Flask(__name__) in conftest 2018-02-28 06:50:49 -08:00
David Lord 310fbfcf64
revert copyright year to project start
add copyright header to files
2018-02-08 12:43:30 -08:00
David Lord 9560f22bb6
clean up 2017-07-10 07:10:47 -07:00
Bijan Vakili a417e41d27 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 5b0b9717da 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 8482ce6b8c 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 bbaf20de7c Add pop and setdefault to AppCtxGlobals 2015-06-20 18:04:58 +02:00
Martijn Pieters ec0d208bc1 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 33534bb4a9 Happy New Year 2015 2015-01-02 11:35:00 +09:00
Petr Zemek 4840fc0edc 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 c6795eb626 Remove useless unittest imports 2014-09-21 16:47:38 +02:00
Markus Unterwaditzer af4cb0ff2b Remove flask superclass 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer d0cf5ef394 WIP 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer 7e8f1053bb Fix assertion error 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer 5da2c00419 Rewrite assertion methods 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer 8fa5e32d9a Tests pass now. 2014-09-11 22:09:50 +02:00
Markus Unterwaditzer 961db8ad72 Made tests recognizable 2014-09-11 22:09:50 +02:00