Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the app once per run, not once per test #3125

Merged
merged 1 commit into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ npm test
display_result $? 3 "Front end code style check"

## Code coverage
py.test -n4 --maxfail=10 --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml --strict -p no:warnings
py.test -n auto --maxfail=10 --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml --strict -p no:warnings
display_result $? 4 "Code coverage"
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ElementNotFound(Exception):
pass


@pytest.fixture
@pytest.fixture(scope='session')
def app_(request):
app = Flask('app')
create_app(app)
Expand All @@ -47,8 +47,6 @@ def app_(request):
app.test_client_class = TestClient
yield app

ctx.pop()


@pytest.fixture(scope='function')
def service_one(api_user_active):
Expand Down