Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a5726b90a | |||
| 719b4b0f84 | |||
| 6338097dbb | |||
| 9c36dcf721 | |||
| 1cc6c4bdef | |||
| 0351d13c2f | |||
| fc850ade5e | |||
| 90d4eb4cc6 | |||
| daf03eccbb | |||
| b7f56e2c59 | |||
| 8f8f276708 | |||
| f3490b2856 | |||
| 5d1630d56d | |||
| 3b88e4a3d5 | |||
| 53848e80a8 | |||
| 3a13bc1a31 |
+40
-37
@@ -1,46 +1,48 @@
|
|||||||
From 9e70838d0fe10576c8e991a2ac8cff09eab8a4b8 Mon Sep 17 00:00:00 2001
|
From 1ade3df7eaefad792a2a519c0f3cc3a8f28a5829 Mon Sep 17 00:00:00 2001
|
||||||
From: Lumir Balhar <lbalhar@redhat.com>
|
From: Lumir Balhar <lbalhar@redhat.com>
|
||||||
Date: Tue, 10 Jan 2023 08:34:25 +0100
|
Date: Tue, 10 Jan 2023 08:34:25 +0100
|
||||||
Subject: [PATCH] fix tests
|
Subject: [PATCH] fix tests
|
||||||
|
|
||||||
---
|
---
|
||||||
pyproject.toml | 5 -----
|
pyproject.toml | 8 --------
|
||||||
src/tox/pytest.py | 16 +++-------------
|
src/tox/pytest.py | 16 +++-------------
|
||||||
tests/test_provision.py | 17 ++---------------
|
tests/test_provision.py | 18 ++----------------
|
||||||
3 files changed, 5 insertions(+), 33 deletions(-)
|
3 files changed, 5 insertions(+), 37 deletions(-)
|
||||||
|
|
||||||
diff --git a/pyproject.toml b/pyproject.toml
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
index c34eed8..4604c52 100644
|
index 74219b1..6cd2da8 100644
|
||||||
--- a/pyproject.toml
|
--- a/pyproject.toml
|
||||||
+++ b/pyproject.toml
|
+++ b/pyproject.toml
|
||||||
@@ -72,9 +72,6 @@ optional-dependencies.docs = [
|
@@ -167,9 +167,6 @@ report.omit = [
|
||||||
|
"tests/type_check/*",
|
||||||
]
|
]
|
||||||
optional-dependencies.testing = [
|
|
||||||
"build[virtualenv]>=1.0.3",
|
|
||||||
- "covdefaults>=2.3",
|
|
||||||
- "detect-test-pollution>=1.2",
|
|
||||||
- "devpi-process>=1",
|
|
||||||
"diff-cover>=8.0.2",
|
|
||||||
"distlib>=0.3.8",
|
|
||||||
"flaky>=3.7",
|
|
||||||
@@ -82,7 +79,6 @@ optional-dependencies.testing = [
|
|
||||||
"hatchling>=1.21",
|
|
||||||
"psutil>=5.9.7",
|
|
||||||
"pytest>=7.4.4",
|
|
||||||
- "pytest-cov>=4.1",
|
|
||||||
"pytest-mock>=3.12",
|
|
||||||
"pytest-xdist>=3.5",
|
|
||||||
"re-assert>=1.1",
|
|
||||||
@@ -162,7 +158,6 @@ paths.source = [
|
|
||||||
report.fail_under = 88
|
|
||||||
report.omit = ["src/tox/config/cli/for_docs.py", "tests/execute/local_subprocess/bad_process.py", "tests/type_check/*"]
|
|
||||||
run.parallel = true
|
run.parallel = true
|
||||||
-run.plugins = ["covdefaults"]
|
-run.plugins = [
|
||||||
|
- "covdefaults",
|
||||||
|
-]
|
||||||
|
|
||||||
[tool.towncrier]
|
[tool.towncrier]
|
||||||
name = "tox"
|
name = "tox"
|
||||||
|
@@ -229,17 +226,12 @@ release = [
|
||||||
|
]
|
||||||
|
test = [
|
||||||
|
"build[virtualenv]>=1.2.2",
|
||||||
|
- "covdefaults>=2.3",
|
||||||
|
- "detect-test-pollution>=1.2",
|
||||||
|
- "devpi-process>=1.0.2",
|
||||||
|
- "diff-cover>=9.2",
|
||||||
|
"distlib>=0.3.8",
|
||||||
|
"flaky>=3.8.1",
|
||||||
|
"hatch-vcs>=0.4",
|
||||||
|
"hatchling>=1.25",
|
||||||
|
"psutil>=6",
|
||||||
|
"pytest>=8.3.3",
|
||||||
|
- "pytest-cov>=5",
|
||||||
|
"pytest-mock>=3.14",
|
||||||
|
"pytest-xdist>=3.6.1",
|
||||||
|
"re-assert>=1.1",
|
||||||
diff --git a/src/tox/pytest.py b/src/tox/pytest.py
|
diff --git a/src/tox/pytest.py b/src/tox/pytest.py
|
||||||
index d734def..5e6df35 100644
|
index ca42a5b..183e2f4 100644
|
||||||
--- a/src/tox/pytest.py
|
--- a/src/tox/pytest.py
|
||||||
+++ b/src/tox/pytest.py
|
+++ b/src/tox/pytest.py
|
||||||
@@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c
|
@@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c
|
||||||
@@ -51,7 +53,7 @@ index d734def..5e6df35 100644
|
|||||||
from virtualenv.info import fs_supports_symlink
|
from virtualenv.info import fs_supports_symlink
|
||||||
|
|
||||||
import tox.run
|
import tox.run
|
||||||
@@ -277,9 +276,9 @@ class ToxProject:
|
@@ -280,9 +279,9 @@ class ToxProject:
|
||||||
m.setattr(sys, "argv", [sys.executable, "-m", "tox", *list(args)])
|
m.setattr(sys, "argv", [sys.executable, "-m", "tox", *list(args)])
|
||||||
m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1")
|
m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1")
|
||||||
m.setenv("VIRTUALENV_SYMLINKS", "1")
|
m.setenv("VIRTUALENV_SYMLINKS", "1")
|
||||||
@@ -64,7 +66,7 @@ index d734def..5e6df35 100644
|
|||||||
try:
|
try:
|
||||||
tox_run(args)
|
tox_run(args)
|
||||||
except SystemExit as exception:
|
except SystemExit as exception:
|
||||||
@@ -472,15 +471,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None
|
@@ -475,15 +474,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None
|
||||||
monkeypatch.setenv("PIP_TIMEOUT", str(2))
|
monkeypatch.setenv("PIP_TIMEOUT", str(2))
|
||||||
|
|
||||||
|
|
||||||
@@ -78,13 +80,13 @@ index d734def..5e6df35 100644
|
|||||||
-
|
-
|
||||||
-
|
-
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def _invalid_index_fake_port() -> int: # noqa: PT005
|
def _invalid_index_fake_port() -> int:
|
||||||
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler:
|
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler:
|
||||||
diff --git a/tests/test_provision.py b/tests/test_provision.py
|
diff --git a/tests/test_provision.py b/tests/test_provision.py
|
||||||
index 41eb630..1df7e76 100644
|
index 5b2b652..7657c2e 100644
|
||||||
--- a/tests/test_provision.py
|
--- a/tests/test_provision.py
|
||||||
+++ b/tests/test_provision.py
|
+++ b/tests/test_provision.py
|
||||||
@@ -92,21 +92,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path]
|
@@ -98,22 +98,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@@ -97,25 +99,26 @@ index 41eb630..1df7e76 100644
|
|||||||
- return self_index
|
- return self_index
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
@pytest.fixture()
|
@pytest.fixture
|
||||||
-def _pypi_index_self(pypi_index_self: Index, monkeypatch: MonkeyPatch) -> None:
|
-def _pypi_index_self(pypi_index_self: Index, monkeypatch: MonkeyPatch) -> None:
|
||||||
- pypi_index_self.use()
|
- pypi_index_self.use()
|
||||||
- monkeypatch.setenv("PIP_INDEX_URL", pypi_index_self.url)
|
- monkeypatch.setenv("PIP_INDEX_URL", pypi_index_self.url)
|
||||||
- monkeypatch.setenv("PIP_RETRIES", str(2))
|
- monkeypatch.setenv("PIP_RETRIES", str(2))
|
||||||
- monkeypatch.setenv("PIP_TIMEOUT", str(5))
|
- monkeypatch.setenv("PIP_TIMEOUT", str(5))
|
||||||
|
-
|
||||||
+def _pypi_index_self():
|
+def _pypi_index_self():
|
||||||
+ pytest.skip("needs devpi-process")
|
+ pytest.skip("needs devpi-process")
|
||||||
|
|
||||||
|
|
||||||
def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None:
|
def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None:
|
||||||
@@ -155,7 +143,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -
|
ini = "[tox]\nrequires = pkg-does-not-exist\n setuptools==1\nskipsdist=true\n"
|
||||||
|
@@ -161,7 +148,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.integration()
|
@pytest.mark.integration
|
||||||
-@pytest.mark.usefixtures("_pypi_index_self")
|
-@pytest.mark.usefixtures("_pypi_index_self")
|
||||||
def test_provision_platform_check(tox_project: ToxProjectCreator) -> None:
|
def test_provision_platform_check(tox_project: ToxProjectCreator) -> None:
|
||||||
ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform"
|
ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform"
|
||||||
proj = tox_project({"tox.ini": ini})
|
proj = tox_project({"tox.ini": ini})
|
||||||
--
|
--
|
||||||
2.44.0
|
2.47.0
|
||||||
|
|
||||||
|
|||||||
+23
-20
@@ -1,5 +1,6 @@
|
|||||||
# Many tests are enabled by default
|
%bcond bootstrap 0
|
||||||
%bcond tests 1
|
# Many tests are enabled by default, unless bootstrapping
|
||||||
|
%bcond tests %{without bootstrap}
|
||||||
# However, some tests are disabled by default, becasue they require:
|
# However, some tests are disabled by default, becasue they require:
|
||||||
# a) tested tox to be installed and/or
|
# a) tested tox to be installed and/or
|
||||||
# b) internet connection
|
# b) internet connection
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
%undefine _py3_shebang_s
|
%undefine _py3_shebang_s
|
||||||
|
|
||||||
Name: python-tox
|
Name: python-tox
|
||||||
Version: 4.14.2
|
Version: 4.23.2
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Virtualenv-based automation of test activities
|
Summary: Virtualenv-based automation of test activities
|
||||||
|
|
||||||
@@ -36,7 +37,8 @@ Patch: fix-tests.patch
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: pyproject-rpm-macros
|
# for dependency-groups support:
|
||||||
|
BuildRequires: pyproject-rpm-macros >= 1.16
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: /usr/bin/gcc
|
BuildRequires: /usr/bin/gcc
|
||||||
@@ -47,12 +49,10 @@ BuildRequires: /usr/bin/python
|
|||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
# xdist is not used upstream, but we use it to speed up the %%check
|
# xdist is not used upstream, but we use it to speed up the %%check
|
||||||
BuildRequires: python3-pytest-xdist
|
BuildRequires: python3-pytest-xdist
|
||||||
# for test_allowed_implicit_cli_envs[py310]
|
|
||||||
# TODO remove this once https://github.com/tox-dev/tox/pull/3108 is released
|
|
||||||
BuildRequires: python3.10
|
|
||||||
%if %{with ci_tests}
|
%if %{with ci_tests}
|
||||||
# The CI tests only work if the tested tox is installed :(
|
# The CI tests only work if the tested tox is installed :(
|
||||||
BuildRequires: tox = %{version}-%{release}
|
# This should technically be the same V-R, but the CI does not handle %%autorelease well
|
||||||
|
BuildRequires: tox = %{version}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -81,15 +81,10 @@ Summary: %{summary}
|
|||||||
# however it launches other Python versions as subprocesses.
|
# however it launches other Python versions as subprocesses.
|
||||||
# It recommends all Python versions it supports. (This is an exception to
|
# It recommends all Python versions it supports. (This is an exception to
|
||||||
# the rule that Fedora packages may not require the alternative interpreters.)
|
# the rule that Fedora packages may not require the alternative interpreters.)
|
||||||
Recommends: python2.7
|
|
||||||
Recommends: python3.6
|
|
||||||
Recommends: python3.7
|
|
||||||
Recommends: python3.8
|
Recommends: python3.8
|
||||||
Recommends: python3.9
|
Recommends: python3.9
|
||||||
Recommends: python3.10
|
Recommends: python3.10
|
||||||
Recommends: pypy2-devel
|
|
||||||
Recommends: pypy3-devel
|
Recommends: pypy3-devel
|
||||||
Recommends: python2-devel
|
|
||||||
Recommends: python3-devel
|
Recommends: python3-devel
|
||||||
# Instead of adding new Pythons here, add `Supplements: tox` to them, see:
|
# Instead of adding new Pythons here, add `Supplements: tox` to them, see:
|
||||||
# https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/NVVUXSVSPFQOWIGBE2JNI67HEO7R63ZQ/
|
# https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/NVVUXSVSPFQOWIGBE2JNI67HEO7R63ZQ/
|
||||||
@@ -104,15 +99,15 @@ Recommends: python3-devel
|
|||||||
|
|
||||||
# Upstream updates dependencies too aggressively
|
# Upstream updates dependencies too aggressively
|
||||||
# see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356
|
# see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356
|
||||||
sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|diff-cover|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|pluggy|distlib|cachetools|build\[virtualenv\])>=.*/"\1",/g' \
|
sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|pluggy|distlib|cachetools|build\[virtualenv\]|setuptools|flaky)>=.*/"\1",/g' \
|
||||||
-e "s/'(time-machine)>=[^;']+/'\1/" \
|
-e 's/"(time-machine)>=[^;"]+/"\1/' \
|
||||||
-e 's/"(virtualenv)>=.*/"\1>=20",/g' \
|
-e 's/"(virtualenv)>=.*/"\1>=20",/g' \
|
||||||
-e 's/"(hatchling)>=.*/"\1>=1.13",/g' \
|
-e 's/"(hatchling)>=.*/"\1>=1.13",/g' \
|
||||||
pyproject.toml
|
pyproject.toml
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
|
export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
|
||||||
%pyproject_buildrequires -r %{?with_tests:-x testing}
|
%pyproject_buildrequires -r %{?with_tests:-g test}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@@ -134,6 +129,18 @@ k="${k-}${k+ and }not test_virtualenv_flipped_settings"
|
|||||||
k="${k-}${k+ and }not test_virtualenv_env_ignored_if_set"
|
k="${k-}${k+ and }not test_virtualenv_env_ignored_if_set"
|
||||||
k="${k-}${k+ and }not test_virtualenv_env_used_if_not_set"
|
k="${k-}${k+ and }not test_virtualenv_env_used_if_not_set"
|
||||||
|
|
||||||
|
# https://github.com/tox-dev/tox/issues/3290
|
||||||
|
%if v"0%{?python3_version}" >= v"3.13"
|
||||||
|
k="${k-}${k+ and }not test_str_convert_ok_py39"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# https://github.com/tox-dev/tox/commit/698f1dd663
|
||||||
|
# Until we have setuptools 70.1+ we skip those
|
||||||
|
k="${k-}${k+ and }not test_result_json_sequential"
|
||||||
|
k="${k-}${k+ and }not test_setuptools_package"
|
||||||
|
k="${k-}${k+ and }not test_skip_develop_mode"
|
||||||
|
k="${k-}${k+ and }not test_tox_install_pkg_sdist"
|
||||||
|
|
||||||
# The following tests either need internet connection or installed tox
|
# The following tests either need internet connection or installed tox
|
||||||
# so we only run them on the CI.
|
# so we only run them on the CI.
|
||||||
%if %{without ci_tests}
|
%if %{without ci_tests}
|
||||||
@@ -144,10 +151,6 @@ k="${k-}${k+ and }not test_build_wheel_external"
|
|||||||
k="${k-}${k+ and }not keyboard_interrupt"
|
k="${k-}${k+ and }not keyboard_interrupt"
|
||||||
k="${k-}${k+ and }not test_call_as_module"
|
k="${k-}${k+ and }not test_call_as_module"
|
||||||
k="${k-}${k+ and }not test_call_as_exe"
|
k="${k-}${k+ and }not test_call_as_exe"
|
||||||
# test_local_execute_* have "\r\n" in outputs for some
|
|
||||||
# unknown reason, reported: https://github.com/tox-dev/tox/issues/2841
|
|
||||||
k="${k-}${k+ and }not test_local_execute_basic_pass_show_on_standard_newline_flush"
|
|
||||||
k="${k-}${k+ and }not test_local_execute_write_a_lot"
|
|
||||||
k="${k-}${k+ and }not test_run_installpkg_targz"
|
k="${k-}${k+ and }not test_run_installpkg_targz"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
SHA512 (tox-4.14.2.tar.gz) = 45bbd3f8d00eee05158452295230321947ec16a8bfff43e84ea9825d514976526f3889709255ed042cfb7a7ebfed020707cfc2d25b69ce90c148f4472092350d
|
SHA512 (tox-4.23.2.tar.gz) = 5008964ebed3c94a6ad5f0985150c7bf73fd3996b91171b16323d195bf0288102aac0dc38848bd4c63e5c5678ab1a82c170579139eda97132a4555eb11d381a0
|
||||||
|
|||||||
+3
-17
@@ -30,15 +30,6 @@
|
|||||||
- all_supplementing_pythons:
|
- all_supplementing_pythons:
|
||||||
dir: tests
|
dir: tests
|
||||||
run: ./all_supplementing_pythons.py
|
run: ./all_supplementing_pythons.py
|
||||||
- smoke27:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=2.7 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke36:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.6 ./venv.sh
|
|
||||||
- smoke37_optional:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh
|
|
||||||
- smoke38:
|
- smoke38:
|
||||||
dir: python/smoke
|
dir: python/smoke
|
||||||
run: VERSION=3.8 ./venv.sh
|
run: VERSION=3.8 ./venv.sh
|
||||||
@@ -57,12 +48,9 @@
|
|||||||
- smoke313:
|
- smoke313:
|
||||||
dir: python/smoke
|
dir: python/smoke
|
||||||
run: VERSION=3.13 ./venv.sh
|
run: VERSION=3.13 ./venv.sh
|
||||||
- smoke_pypy37_optional:
|
- smoke314:
|
||||||
dir: python/smoke
|
dir: python/smoke
|
||||||
run: PYTHON=pypy3.7 VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh
|
run: VERSION=3.14 ./venv.sh
|
||||||
- smoke_pypy38_optional:
|
|
||||||
dir: python/smoke
|
|
||||||
run: PYTHON=pypy3.8 VERSION=3.8 INSTALL_OR_SKIP=true ./venv.sh
|
|
||||||
- smoke_pypy39:
|
- smoke_pypy39:
|
||||||
dir: python/smoke
|
dir: python/smoke
|
||||||
run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh
|
run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh
|
||||||
@@ -81,15 +69,13 @@
|
|||||||
required_packages:
|
required_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- virtualenv
|
- virtualenv
|
||||||
- python2.7
|
|
||||||
- python3.6
|
|
||||||
- python3.8
|
- python3.8
|
||||||
- python3.9
|
- python3.9
|
||||||
- python3.10-devel
|
- python3.10-devel
|
||||||
- python3.11-devel
|
- python3.11-devel
|
||||||
- python3.12-devel
|
- python3.12-devel
|
||||||
- python3.13-devel
|
- python3.13-devel
|
||||||
- python2-devel
|
- python3.14-devel
|
||||||
- pypy3.9-devel
|
- pypy3.9-devel
|
||||||
- pypy3.10-devel
|
- pypy3.10-devel
|
||||||
- python3-tox
|
- python3-tox
|
||||||
|
|||||||
Reference in New Issue
Block a user