From b99edfcf98cc011366400f127ab7fd02a8bfb12c Mon Sep 17 00:00:00 2001 From: Jimmy Royer Date: Thu, 23 Mar 2023 15:59:17 -0400 Subject: [PATCH] Trying out perf tuning --- scripts/run_tests.sh | 2 +- tests/conftest.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index d9a68da6fb..4155082dc2 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -44,5 +44,5 @@ npm test display_result $? 1 "npm test" ## Code coverage -py.test -n4 --maxfail=1 tests/ --strict -p no:warnings +py.test -n auto --maxfail=1 tests/ --strict -p no:warnings display_result $? 1 "Code coverage" diff --git a/tests/conftest.py b/tests/conftest.py index 17a7f6b61a..8cdd2c2d8a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -60,7 +60,7 @@ def a11y_test(slug: str, html): return True -@pytest.fixture +@pytest.fixture(scope="session") def app_(): app = Flask("app") create_app(app) @@ -71,8 +71,6 @@ def app_(): app.test_client_class = TestClient yield app - ctx.pop() - @pytest.fixture(scope="function") def service_one(api_user_active): @@ -1394,7 +1392,6 @@ def active_user_with_permissions(fake_uuid): @pytest.fixture(scope="function") def active_user_with_permission_to_two_services(fake_uuid): - permissions = [ "send_texts", "send_emails", @@ -1430,7 +1427,6 @@ def active_user_with_permission_to_two_services(fake_uuid): @pytest.fixture(scope="function") def active_caseworking_user(fake_uuid): - user_data = { "id": fake_uuid, "name": "Test User",