From b335a8f75cbcb06a52304f9ba2d33f29f6242a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20G=C3=B6rner?= <5477952+MaxG87@users.noreply.github.com> Date: Fri, 15 Dec 2023 09:03:50 +0100 Subject: [PATCH 1/2] =?UTF-8?q?deps:=20F=C3=BCge=20pytest-xdist=20als=20de?= =?UTF-8?q?v-dependency=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 36 +++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 204d875..9a14b9b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -170,6 +170,20 @@ files = [ [package.extras] test = ["pytest (>=6)"] +[[package]] +name = "execnet" +version = "2.0.2" +description = "execnet: rapid multi-Python deployment" +optional = false +python-versions = ">=3.7" +files = [ + {file = "execnet-2.0.2-py3-none-any.whl", hash = "sha256:88256416ae766bc9e8895c76a87928c0012183da3cc4fc18016e6f050e025f41"}, + {file = "execnet-2.0.2.tar.gz", hash = "sha256:cc59bc4423742fd71ad227122eb0dd44db51efb3dc4095b45ac9a08c770096af"}, +] + +[package.extras] +testing = ["hatch", "pre-commit", "pytest", "tox"] + [[package]] name = "fancycompleter" version = "0.9.1" @@ -726,6 +740,26 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +[[package]] +name = "pytest-xdist" +version = "3.5.0" +description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-xdist-3.5.0.tar.gz", hash = "sha256:cbb36f3d67e0c478baa57fa4edc8843887e0f6cfc42d677530a36d7472b32d8a"}, + {file = "pytest_xdist-3.5.0-py3-none-any.whl", hash = "sha256:d075629c7e00b611df89f490a5063944bee7a4362a5ff11c7cc7824a03dfce24"}, +] + +[package.dependencies] +execnet = ">=1.1" +pytest = ">=6.2.0" + +[package.extras] +psutil = ["psutil (>=3.0)"] +setproctitle = ["setproctitle"] +testing = ["filelock"] + [[package]] name = "rich" version = "13.7.0" @@ -891,4 +925,4 @@ all = ["rich"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<3.12" -content-hash = "22b7bbea6ee87d32b0226c8dc449d55c8c4adb23ac42915daea2930581985680" +content-hash = "ee5356eeaac7d003c6fc7301958b0678c32322b96e472e1916a1041f25239a3d" diff --git a/pyproject.toml b/pyproject.toml index 97990a5..f488efc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ pytest-cov = "^3.0.0" mypy = "^1.4.1" black = "^23.7.0" ruff = "^0.0.278" +pytest-xdist = "^3.5.0" [tool.poetry.scripts] butter-backup = "butter_backup.cli:cli" From 64f1ec6bc8b9f036c621d77c56e9b38aec09076e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20G=C3=B6rner?= <5477952+MaxG87@users.noreply.github.com> Date: Fri, 15 Dec 2023 09:04:16 +0100 Subject: [PATCH 2/2] ci: Verwende pytest-xdist in lokaler CI --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d74ac14..7a36a52 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ $(CACHEDIR): $(CACHEDIR)/run-undockered-tests: | $(CACHEDIR) - poetry run pytest + poetry run pytest -n $$(nproc) touch $@ $(CACHEDIR)/run-%-tests: | $(CACHEDIR)/%-test-image