From f383a37f0537e108d5b14d955f81a56d15c8a8d6 Mon Sep 17 00:00:00 2001 From: Francois Campbell Date: Tue, 22 Oct 2024 16:16:51 -0400 Subject: [PATCH] Add pytest-xdist to optional deps, run unit tests in parallel --- pyproject.toml | 9 ++------- snyk/requirements.txt | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index caab5b40b5..fba5ce72cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ development = [ "pre-commit>=3.5.0", "pytest==8.3.3", "pytest-randomly==3.15.0", + "pytest-xdist==3.6.1", "syrupy==4.7.2", "factory-boy==3.3.1", "Faker==30.3.0", @@ -93,7 +94,7 @@ features = ["development"] [tool.hatch.envs.default.scripts] test = ["pytest tests/"] test-cov = [ - "coverage run --source=snowflake.cli --module pytest tests/ ", + "coverage run --source=snowflake.cli --module pytest -n auto tests/ ", "coverage run --source=snowflake.cli --module pytest -m loaded_modules tests/ ", "coverage report", ] @@ -130,12 +131,6 @@ test = ["pytest -m performance"] [tool.hatch.envs.integration] template = "integration" -pre-install-commands = [ - # Disabled due to repo migration - # "pip install test_external_plugins/snowpark_hello_single_command", - # "pip install test_external_plugins/multilingual_hello_command_group", - "pip install pytest-xdist", -] features = ["development"] [tool.hatch.envs.integration.scripts] diff --git a/snyk/requirements.txt b/snyk/requirements.txt index 36c0cfb5b5..d55d0c65e5 100644 --- a/snyk/requirements.txt +++ b/snyk/requirements.txt @@ -19,6 +19,7 @@ coverage==7.6.3 pre-commit>=3.5.0 pytest==8.3.3 pytest-randomly==3.15.0 +pytest-xdist==3.6.1 syrupy==4.7.2 factory-boy==3.3.1 Faker==30.3.0