From b51baa069a137f2d797ac7943ad4fc265abf3f58 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Tue, 4 Nov 2025 18:06:38 -0800 Subject: [PATCH] Add pytest-xdist plugin to speed up tests Running locally on my Mac: - pytest: 1min 20sec - pytest -n auto: 15sec https://pypi.org/project/pytest-xdist/ --- .github/workflows/run-tests.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4af48d064..9ac7ebb6a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -48,7 +48,7 @@ jobs: - name: Test with pytest if: always() run: | - pytest test + pytest test -n auto - name: Test build if: always() diff --git a/pyproject.toml b/pyproject.toml index 68f7589ca..3e77d4004 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ repository = "https://github.com/tableau/server-client-python" [project.optional-dependencies] test = ["black==24.8", "build", "mypy==1.4", "pytest>=7.0", "pytest-cov", "pytest-subtests", - "requests-mock>=1.0,<2.0"] + "pytest-xdist", "requests-mock>=1.0,<2.0"] [tool.black] line-length = 120