I was testing the new TEST_IS_INTERACTIVE=network stuff and figured
www/py-requests would be ideal for that. However, the tests were
broken. I looked into it and they are broken for pytest >=4
Upstream has done a commit with a patch that fixes it, but it hasn't
been in a release yet, so I added the patch manually. Once this patch
is applied, the tests run as they should.
cc'ing maintainer
--Kurt
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/py-requests/Makefile,v
retrieving revision 1.36
diff -u -p -r1.36 Makefile
--- Makefile 20 May 2019 02:30:22 -0000 1.36
+++ Makefile 29 Jun 2019 17:00:26 -0000
@@ -5,6 +5,7 @@ COMMENT= elegant and simple HTTP librar
MODPY_EGG_VERSION= 2.22.0
DISTNAME= requests-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
+REVISION= 0
CATEGORIES= www
Index: patches/patch-tests_test_utils_py
===================================================================
RCS file: patches/patch-tests_test_utils_py
diff -N patches/patch-tests_test_utils_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_test_utils_py 29 Jun 2019 17:00:26 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix tests for pytest 4. From an upstream patch not in a release yet.
+
+Index: tests/test_utils.py
+--- tests/test_utils.py.orig
++++ tests/test_utils.py
+@@ -33,7 +33,8 @@ class TestSuperLen:
+ 'stream, value', (
+ (StringIO.StringIO, 'Test'),
+ (BytesIO, b'Test'),
+- pytest.mark.skipif('cStringIO is None')((cStringIO, 'Test')),
++ pytest.param(cStringIO, 'Test',
++ marks=pytest.mark.skipif('cStringIO is None')),
+ ))
+ def test_io_streams(self, stream, value):
+ """Ensures that we properly deal with different kinds of IO streams."""
No comments:
Post a Comment