- Add patch add-network-marker.patch:
* Mark tests that require the network as such, so we can skip them. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pyro5?expand=0&rev=3
This commit is contained in:
50
add-network-marker.patch
Normal file
50
add-network-marker.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
Index: Pyro5-5.14/setup.cfg
|
||||
===================================================================
|
||||
--- Pyro5-5.14.orig/setup.cfg
|
||||
+++ Pyro5-5.14/setup.cfg
|
||||
@@ -50,3 +50,5 @@ exclude = .git,__pycache__,.tox,docs,tes
|
||||
tag_build =
|
||||
tag_date = 0
|
||||
|
||||
+[tool:pytest]
|
||||
+markers = network: Mark a test as requiring network access
|
||||
Index: Pyro5-5.14/tests/test_socketutil.py
|
||||
===================================================================
|
||||
--- Pyro5-5.14.orig/tests/test_socketutil.py
|
||||
+++ Pyro5-5.14/tests/test_socketutil.py
|
||||
@@ -29,6 +29,7 @@ class TestSocketutil:
|
||||
def setup_class(cls):
|
||||
config.POLLTIMEOUT = 0.1
|
||||
|
||||
+ @pytest.mark.network
|
||||
def testGetIP(self):
|
||||
config.PREFER_IP_VERSION = 4
|
||||
myip = socketutil.get_ip_address("")
|
||||
Index: Pyro5-5.14/tests/test_naming.py
|
||||
===================================================================
|
||||
--- Pyro5-5.14.orig/tests/test_naming.py
|
||||
+++ Pyro5-5.14/tests/test_naming.py
|
||||
@@ -36,6 +36,7 @@ class NSLoopThread(threading.Thread):
|
||||
|
||||
|
||||
class TestBCSetup:
|
||||
+ @pytest.mark.network
|
||||
def testBCstart(self):
|
||||
myIpAddress = Pyro5.socketutil.get_ip_address("", workaround127=True)
|
||||
nsUri, nameserver, bcserver = Pyro5.nameserver.start_ns(host=myIpAddress, port=0, bcport=0, enableBroadcast=False)
|
||||
@@ -243,6 +244,7 @@ class TestNameServer0000:
|
||||
config.NS_PORT = self.old_nsPort
|
||||
config.NS_BCPORT = self.old_bcPort
|
||||
|
||||
+ @pytest.mark.network
|
||||
def testBCLookup0000(self):
|
||||
ns = Pyro5.core.locate_ns() # broadcast lookup
|
||||
assert isinstance(ns, Pyro5.client.Proxy)
|
||||
@@ -388,6 +390,7 @@ class TestOfflineNameServer:
|
||||
pass
|
||||
ns.close()
|
||||
|
||||
+ @pytest.mark.network
|
||||
def testStartNSfunc(self):
|
||||
myIpAddress = Pyro5.socketutil.get_ip_address("", workaround127=True)
|
||||
uri1, ns1, bc1 = Pyro5.nameserver.start_ns(host=myIpAddress, port=0, bcport=0, enableBroadcast=False)
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 23 01:42:22 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
Thu Feb 23 05:07:24 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- New package, in a sense, based on Pyro4.
|
||||
- Update to 5.14:
|
||||
@@ -40,6 +40,8 @@ Thu Feb 23 01:42:22 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
* made msgpack serializer optional
|
||||
* NATPORT behavior fix when 0
|
||||
* serialization improvements/fixes
|
||||
- Add patch add-network-marker.patch:
|
||||
* Mark tests that require the network as such, so we can skip them.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 21 18:29:33 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
@@ -23,6 +23,8 @@ Summary: Distributed object middleware for Python (RPC)
|
||||
License: MIT
|
||||
URL: https://github.com/irmen/Pyro5
|
||||
Source: https://files.pythonhosted.org/packages/source/P/Pyro5/Pyro5-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM FIXME
|
||||
Patch0: add-network-marker.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -73,10 +75,7 @@ runs on many different platforms and Python versions.
|
||||
%python_clone -a %{buildroot}%{_bindir}/pyro5-nsc
|
||||
|
||||
%check
|
||||
# socket tests require at least lo interface thus skip them
|
||||
skip="test_socketutil"
|
||||
export PYTHONPATH=${PWD}/tests/PyroTests
|
||||
%pytest -rs -v -k "not ($skip)"
|
||||
%pytest -m "not network"
|
||||
|
||||
%post
|
||||
%{python_install_alternative pyro5-check-config pyro5-echoserver pyro5-httpgateway pyro5-ns pyro5-nsc}
|
||||
|
||||
Reference in New Issue
Block a user