import unittest from app.core import app from app import blueprint # app = create_app() app.register_blueprint(blueprint) app.app_context().push() def test(): """Runs the unit tests.""" tests = unittest.TestLoader().discover('app/test', pattern='test*.py') result = unittest.TextTestRunner(verbosity=2).run(tests) if result.wasSuccessful(): return 0 return 1 if __name__ == '__main__': app.run()
from app.core import app if __name__ == '__main__': app.run(host='0.0.0.0', debug=True)
from app.core import app as application if __name__ == '__main__': application.run()
from app.core import app if __name__ == "__main__": app.run(debug=True)
from app.core import app if __name__ == "__main__": # pragma: no cover app.run(host='0.0.0.0')