forked from pool/python-txaio
After osc pull
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-txaio?expand=0&rev=15
This commit is contained in:
47
pytest4.patch
Normal file
47
pytest4.patch
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
From 9217f054b7eccc120f84e01995479125e07de59a Mon Sep 17 00:00:00 2001
|
||||||
|
From: meejah <meejah@meejah.ca>
|
||||||
|
Date: Fri, 22 Feb 2019 12:01:46 -0700
|
||||||
|
Subject: [PATCH] make pytest happy
|
||||||
|
|
||||||
|
---
|
||||||
|
test/conftest.py | 12 ++++++++++--
|
||||||
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/conftest.py b/test/conftest.py
|
||||||
|
index 4a225c8..a3ca2d6 100644
|
||||||
|
--- a/test/conftest.py
|
||||||
|
+++ b/test/conftest.py
|
||||||
|
@@ -25,9 +25,9 @@ def framework(request):
|
||||||
|
|
||||||
|
try:
|
||||||
|
if request.param == 'twisted':
|
||||||
|
- return framework_tx()
|
||||||
|
+ return _notfixture_framework_tx()
|
||||||
|
elif request.param == 'asyncio':
|
||||||
|
- return framework_aio()
|
||||||
|
+ return _notfixture_framework_aio()
|
||||||
|
except ImportError:
|
||||||
|
pytest.skip()
|
||||||
|
|
||||||
|
@@ -43,6 +43,10 @@ def framework_uninitialized():
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def framework_tx():
|
||||||
|
+ return _notfixture_framework_tx()
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def _notfixture_framework_tx():
|
||||||
|
try:
|
||||||
|
import txaio
|
||||||
|
from txaio import tx
|
||||||
|
@@ -56,6 +60,10 @@ def framework_tx():
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def framework_aio():
|
||||||
|
+ return _notfixture_framework_aio()
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def _notfixture_framework_aio():
|
||||||
|
try:
|
||||||
|
import txaio
|
||||||
|
from txaio import aio
|
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-txaio
|
Name: python-txaio
|
||||||
Version: 20.3.1
|
Version: 20.3.1
|
||||||
@@ -26,14 +25,20 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/crossbario/txaio
|
URL: https://github.com/crossbario/txaio
|
||||||
Source: https://files.pythonhosted.org/packages/source/t/txaio/txaio-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/t/txaio/txaio-%{version}.tar.gz
|
||||||
|
Patch0: pytest4.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python3-testsuite
|
BuildRequires: python3-testsuite
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
Recommends: python-Twisted >= 12.1.0
|
Recommends: python-Twisted >= 12.1.0
|
||||||
Recommends: python-zope.interface >= 3.6
|
Recommends: python-zope.interface >= 3.6
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%ifpython2
|
||||||
|
Requires: python-future
|
||||||
|
Recommends: python-trollius
|
||||||
|
%endif
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module Twisted >= 12.1.0}
|
BuildRequires: %{python_module Twisted >= 12.1.0}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
@@ -48,6 +53,7 @@ asynchronous Remote Procedure Calls and Publish & Subscribe on top of WebSocket.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n txaio-%{version}
|
%setup -q -n txaio-%{version}
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Reference in New Issue
Block a user