Tests - parallelize python tests w/ pytest-xdist

This commit is contained in:
Sam
2022-11-19 20:17:58 +01:00
parent df7532a633
commit 872105e2d3
11 changed files with 105 additions and 11 deletions

View File

@ -41,7 +41,11 @@ class TestTestingConfig:
app.config.from_object('fittrackee.config.TestingConfig')
assert app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get(
'DATABASE_TEST_URL'
'DATABASE_TEST_URL', ''
) + (
f"_{os.getenv('PYTEST_XDIST_WORKER')}"
if os.getenv('PYTEST_XDIST_WORKER')
else ''
)
def test_it_does_not_preserve_context_on_exception(