[arch-commits] Commit in python-txaio/trunk (PKGBUILD make-pytest-happy.patch)

Evangelos Foutras foutrelis at archlinux.org
Thu Oct 31 19:26:17 UTC 2019


    Date: Thursday, October 31, 2019 @ 19:26:17
  Author: foutrelis
Revision: 521694

Fix some test failures with recent pytest

Added:
  python-txaio/trunk/make-pytest-happy.patch
Modified:
  python-txaio/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   10 +++++++--
 make-pytest-happy.patch |   47 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-10-31 19:22:13 UTC (rev 521693)
+++ PKGBUILD	2019-10-31 19:26:17 UTC (rev 521694)
@@ -11,8 +11,10 @@
 license=('MIT')
 makedepends=('python-setuptools' 'python2-setuptools')
 checkdepends=('python-pytest' 'python-mock' 'python-twisted' 'python2-pytest' 'python2-mock' 'python2-twisted')
-source=("https://pypi.io/packages/source/t/txaio/txaio-$pkgver.tar.gz")
-sha512sums=('5aa0024b32211534b0c673da13b092ba08e15195b3b016bc21104618605d5c0b49096fa2795e13d9d5c4247defa1d72f903cbcc8d00a21359825224faab64b64')
+source=("https://pypi.io/packages/source/t/txaio/txaio-$pkgver.tar.gz"
+        'make-pytest-happy.patch')
+sha512sums=('5aa0024b32211534b0c673da13b092ba08e15195b3b016bc21104618605d5c0b49096fa2795e13d9d5c4247defa1d72f903cbcc8d00a21359825224faab64b64'
+            'bc78ad2ba52d8cd9eb8a2743be93b88b3e162ede50e848e16a7db60f9c0a47115cd8fa92f4151c1d8377852524c07483a18d3d38e349347538a7bde1c56afe27')
 
 prepare() {
   # This tests whether pip can install the sdist, and is completely broken
@@ -19,6 +21,10 @@
   # except in their boutique setup. They won't fix it.
   # https://github.com/crossbario/txaio/issues/77#issuecomment-246276723
   rm txaio-$pkgver/test/test_packaging.py
+
+  # https://github.com/crossbario/txaio/issues/140
+  patch -Np1 -d txaio-$pkgver <make-pytest-happy.patch
+
   cp -a txaio-$pkgver{,-py2}
 
   # Fix tests on Python 3.7 (https://github.com/crossbario/txaio/issues/134)

Added: make-pytest-happy.patch
===================================================================
--- make-pytest-happy.patch	                        (rev 0)
+++ make-pytest-happy.patch	2019-10-31 19:26:17 UTC (rev 521694)
@@ -0,0 +1,47 @@
+From 9217f054b7eccc120f84e01995479125e07de59a Mon Sep 17 00:00:00 2001
+From: meejah <meejah at 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



More information about the arch-commits mailing list