David Lord
e666f7a69c
standardize license and copyright
2019-06-22 13:09:09 -07:00
David Lord
a0ccc47780
clean up flask --version code
2019-01-06 16:24:05 -08:00
garenchan
c38499bbf2
ignore colon with slash when split app_import_path
...
Flask currently supports importing app through a combination of module
path and app variable name, such as '/usr/app.py:my_app'. When the
module path contains a colon, it will conflict with this import way and
a `flask.cli.NoAppException` will be raised.
A file path on a Windows system may contain a colon followed by a slash.
So we solved this problem on Windows by ignoring the colon followed by a
slash when we split app_import_path.
Fix issue #2961 .
2018-10-24 23:47:41 +08:00
ThiefMaster
50227f0954
Add option to not overwrite debug flag in cli
...
This is mainly intended for custom CLIs that may load a config file
which already sets the debug flag and does not make use of the `FLASK_*`
env vars at all.
2018-06-14 13:25:05 +02:00
Briehan Lombaard
a913b4dafd
SSLContext was added in Python 2.7.9
2018-05-17 06:18:42 -07:00
David Lord
5965cb7e1c
rename to FLASK_SKIP_DOTENV, add docs, test
2018-04-29 14:20:17 -07: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
03a2996bb8
Merge pull request #2530 from pallets/feature/factory-detection
...
Improved bad factory error handling
2018-01-28 11:27:07 -08:00
David Lord
2beedabaaf
add HTTPS support for flask run command
2018-01-23 10:03:53 -08:00
David Lord
8bdf820e9b
reset standard os env after each test
2018-01-10 13:53:45 -08:00
Armin Ronacher
c23a63a185
Improved bad factory error handling
2017-11-25 00:05:57 +01:00
David Lord
5436dddf64
rewrite cli errors
...
consistent order for arguments to load functions
refactor find_app_by_string to flow better
more cli loader tests
2017-10-10 07:04:53 -07:00
David Lord
491d331e6e
load env vars using python-dotenv
2017-07-16 13:37:51 -07:00
David Lord
fb845b9032
allow local packages in FLASK_APP
...
don't require .py extension in FLASK_APP
add tests for nested package loading
parametrize cli loading tests
2017-07-14 19:49:05 -07:00
David Lord
448368e226
style cleanup
...
[ci skip]
2017-06-16 06:59:37 -07:00
Miguel Grinberg
7c40aa9e50
Import app from wsgi.py or app.py if FLASK_APP is not defined
...
Fixes #2376
2017-06-15 11:27:50 -07:00
Hendrik Makait
48c2925664
Factor in code review comments and refactor functions to be more naturally split.
2017-05-25 11:28:20 -07:00
Hendrik Makait
7106fb6357
Handle app factory with arguments in FLASK_APP
2017-05-25 10:11:42 -07:00
Christian Stade-Schuldt
4ec1fbc9f5
More DRYing up the test suite ( #2325 )
2017-05-24 17:27:36 -07:00
Hendrik Makait
ae41df9a77
Check if app factory takes script_info argument and call it with(out) script_info as an argument depending on that
2017-05-23 13:48:42 -07:00
Hendrik Makait
ced719ea18
Auto-detect create_app and make_app factory functions
2017-05-22 12:30:18 -07:00
David Lord
7ad79583b9
add sort by match order
...
sort by endpoint by default
combine sort flags
sort methods
ignore HEAD and OPTIONS methods by default
rearrange columns
use format to build row format string
rework tests
add changelog
2017-04-26 10:26:59 -07:00
David Lord
717e45ab15
Merge branch 'master' into routes-command
2017-04-25 13:13:10 -07:00
Ed Brannin
6e5250ab5d
Fix CLI test for ImportError -> NoAppException
2017-03-21 16:17:09 -04:00
Sven-Hendrik Haase
ed17bc1710
Add test to showcase that printing a traceback works
2017-03-16 20:56:12 +01:00
Paul Brown
0832e77b14
prevent NoAppException when ImportError occurs within imported module
2016-12-30 22:45:53 +01:00
Anton Sarukhanov
9121e109bd
Add test for get_version (CLI) ( #1884 )
2016-08-20 17:43:58 +02:00
Nate Prewitt
0f1cf50f97
adding in try around __import__ to catch invalid files/paths ( #1950 )
2016-08-12 15:12:00 +02:00
Hyunchel Kim
f19d3bd67e
Enhance tests.test_cli.test_find_best_app ( #1882 )
...
This commit adds a test case for `test_find_best_app` where
Module object does not contain Flask application.
Also cleans the function little bit to provides more meaningful comment.
2016-07-05 12:46:01 -07:00
Kiss György
1b764cff93
Added runner fixture
2016-06-25 13:24:43 +02:00
Kiss György
b8e826c16b
Added tests, fixed some minor alignment problems.
2016-06-25 13:22:18 +02:00
Anton Sarukhanov
5eaed37116
Add test for find_default_import_path
2016-06-07 08:03:55 -04:00
Hyunchel Kim
64a37bb9b7
Test side effect ( #1889 )
...
Function `prepare_exec_for_file` has a side effect where a path is added to
`sys.path` list.
This commit enhances an exisiting test case for `prepare_exec_for_file`
by testing the side effect of the function and adding necessary
comments.
2016-06-05 10:32:00 -07:00
jphilipsen05
fe5f714026
fixed unmatched elif ( #1872 )
2016-06-03 18:41:10 +02:00
Armin Ronacher
523e271183
Implemented simplified CLI interface
2016-05-26 20:07:52 +02:00
dataforger
92f63a1c1d
fix docstring ( #1818 )
...
change string to docstring
2016-05-24 21:06:34 +02:00
Jannis Leidel
88500f5cc7
Forward ported CLI tests from Flask-CLI and fixed a bug with the CLI's name. ( #1806 )
...
* Forward port the CLI tests from Flask-CLI.
* Make sure the parameter passed to the CLI's AppGroup is the app's name, not the app itself.
2016-05-16 19:36:55 +02:00