PythonAnywhere Forums

How to test run a Flask app

Often times I'd like to test additions to my Flask app before going live with the changes. Is there a way to do something like

python flask_app.py --test new_feature

and this process would start my flask_app and attempt to load mypythonanywhere.com/new_feature

I'm not entirely sure what you're trying to accomplish, but perhaps you can use unit tests. Flask has docs on testing Flask apps

I have the same question . Someone suggest a workaround .

A workaround for what? What, exactly are you trying to accomplish?