API: use of py.test as test runner
This commit is contained in:
parent
a23643b24d
commit
2c5ad23f0c
2
Makefile
2
Makefile
@ -44,7 +44,7 @@ test-e2e:
|
||||
$(NPM) test
|
||||
|
||||
test-python:
|
||||
$(FLASK) test_local
|
||||
$(PYTEST) mpwo_api
|
||||
|
||||
upgrade-db:
|
||||
$(FLASK) db upgrade --directory $(MIGRATIONS)
|
||||
|
@ -42,16 +42,10 @@ def run_test(test_path='mpwo_api/tests'):
|
||||
|
||||
|
||||
@app.cli.command()
|
||||
def test(test_path='mpwo_api/tests'):
|
||||
def test():
|
||||
"""Runs the tests without code coverage."""
|
||||
run_test()
|
||||
|
||||
|
||||
@app.cli.command()
|
||||
def test_local():
|
||||
"""Runs the tests without code coverage in local machine w/ make."""
|
||||
run_test('mpwo_api/mpwo_api/tests')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
|
Loading…
Reference in New Issue
Block a user