mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #3125 from alphagov/faster-tests
Create the app once per run, not once per test
This commit is contained in:
@@ -37,5 +37,5 @@ npm test
|
|||||||
display_result $? 3 "Front end code style check"
|
display_result $? 3 "Front end code style check"
|
||||||
|
|
||||||
## Code coverage
|
## 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"
|
display_result $? 4 "Code coverage"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class ElementNotFound(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture(scope='session')
|
||||||
def app_(request):
|
def app_(request):
|
||||||
app = Flask('app')
|
app = Flask('app')
|
||||||
create_app(app)
|
create_app(app)
|
||||||
@@ -47,8 +47,6 @@ def app_(request):
|
|||||||
app.test_client_class = TestClient
|
app.test_client_class = TestClient
|
||||||
yield app
|
yield app
|
||||||
|
|
||||||
ctx.pop()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
def service_one(api_user_active):
|
def service_one(api_user_active):
|
||||||
|
|||||||
Reference in New Issue
Block a user