forked from pool/python-tox
Accepting request 1109638 from home:mschreiner:branches:devel:languages:python
- Refresh mark-network-tests.patch for 4.11.1. - Rewrite optional_devpi_process.patch for 4.11.1. - Add explicit numpy built-time dependency, as the one pulled by pytest-randomly was broken. - Fix rpmlint warning: package was obsoleting itself. - Update to 4.11.1. - Please check the .changes file for a more complete changelog. OBS-URL: https://build.opensuse.org/request/show/1109638 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=109
This commit is contained in:
@@ -1,42 +1,32 @@
|
||||
---
|
||||
src/tox/pytest.py | 6 +++++-
|
||||
tests/test_provision.py | 6 +++++-
|
||||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/tox/pytest.py
|
||||
+++ b/src/tox/pytest.py
|
||||
@@ -26,7 +26,10 @@ from _pytest.logging import LogCaptureFi
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from _pytest.python import Function
|
||||
from _pytest.tmpdir import TempPathFactory
|
||||
Index: tox-4.11.1/src/tox/pytest.py
|
||||
===================================================================
|
||||
--- tox-4.11.1.orig/src/tox/pytest.py
|
||||
+++ tox-4.11.1/src/tox/pytest.py
|
||||
@@ -16,7 +16,10 @@ from typing import TYPE_CHECKING, Any, C
|
||||
|
||||
import pytest
|
||||
from _pytest.fixtures import SubRequest
|
||||
-from devpi_process import IndexServer
|
||||
+try:
|
||||
+ from devpi_process import IndexServer
|
||||
+except ImportError:
|
||||
+ IndexServer = None
|
||||
from pytest_mock import MockerFixture
|
||||
from virtualenv.info import fs_supports_symlink
|
||||
|
||||
@@ -473,6 +476,7 @@ def enable_pypi_server(monkeypatch: Monk
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
+@pytest.mark.skipif(IndexServer is None, reason="requires devpi_process")
|
||||
def pypi_server(tmp_path_factory: TempPathFactory) -> Iterator[IndexServer]:
|
||||
# takes around 2.5s
|
||||
path = tmp_path_factory.mktemp("pypi")
|
||||
--- a/tests/test_provision.py
|
||||
+++ b/tests/test_provision.py
|
||||
@@ -12,7 +12,11 @@ from unittest import mock
|
||||
from zipfile import ZipFile
|
||||
|
||||
import pytest
|
||||
-from devpi_process import Index, IndexServer
|
||||
+try:
|
||||
+ from devpi_process import Index, IndexServer
|
||||
+except ImportError:
|
||||
+ Index = None
|
||||
+ IndexServer = None
|
||||
from filelock import FileLock
|
||||
import tox.run
|
||||
Index: tox-4.11.1/tests/test_provision.py
|
||||
===================================================================
|
||||
--- tox-4.11.1.orig/tests/test_provision.py
|
||||
+++ tox-4.11.1/tests/test_provision.py
|
||||
@@ -16,7 +16,10 @@ from filelock import FileLock
|
||||
from packaging.requirements import Requirement
|
||||
|
||||
if TYPE_CHECKING:
|
||||
- from devpi_process import Index, IndexServer
|
||||
+ try:
|
||||
+ from devpi_process import Index, IndexServer
|
||||
+ except ImportError:
|
||||
+ Index, IndexServer = None, None
|
||||
|
||||
from tox.pytest import MonkeyPatch, TempPathFactory, ToxProjectCreator
|
||||
|
||||
|
Reference in New Issue
Block a user