- Remove ignore-tests.patch -- testing what will happen
- Add e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch from upstream to remove some warnings. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=49
This commit is contained in:
32
e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
Normal file
32
e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
# HG changeset patch
|
||||
# User Armin Rigo <arigo@tunes.org>
|
||||
# Date 1537369554 -7200
|
||||
# Node ID e2e324a2f13e3a646de6f6ff03e90ed7d37e2636
|
||||
# Parent 8076f2ac1bd2b68b7015fb1fb936bd6907946756
|
||||
Issue #384
|
||||
|
||||
Un-ignore the warnings when testing for them, in case someone runs
|
||||
py.test with the PYTHONWARNINGS environment variable set
|
||||
|
||||
diff --git a/c/test_c.py b/c/test_c.py
|
||||
--- a/c/test_c.py
|
||||
+++ b/c/test_c.py
|
||||
@@ -3968,6 +3968,7 @@
|
||||
z3 = cast(BVoidP, 0)
|
||||
z4 = cast(BUCharP, 0)
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
+ warnings.simplefilter("always")
|
||||
newp(new_pointer_type(BIntP), z1) # warn
|
||||
assert len(w) == 1
|
||||
newp(new_pointer_type(BVoidP), z1) # fine
|
||||
diff --git a/testing/cffi0/backend_tests.py b/testing/cffi0/backend_tests.py
|
||||
--- a/testing/cffi0/backend_tests.py
|
||||
+++ b/testing/cffi0/backend_tests.py
|
||||
@@ -1386,6 +1386,7 @@
|
||||
ffi = FFI(backend=self.Backend())
|
||||
ffi.cdef("enum foo;")
|
||||
with warnings.catch_warnings(record=True) as log:
|
||||
+ warnings.simplefilter("always")
|
||||
n = ffi.cast("enum foo", -1)
|
||||
assert int(n) == 0xffffffff
|
||||
assert str(log[0].message) == (
|
@@ -1,46 +0,0 @@
|
||||
--- a/c/test_c.py
|
||||
+++ b/c/test_c.py
|
||||
@@ -3908,6 +3908,7 @@ def test_cdata_dir():
|
||||
check_dir(pp[0], ['a1', 'a2'])
|
||||
check_dir(pp[0][0], ['a1', 'a2'])
|
||||
|
||||
+@py.test.mark.skip(reason="Temporarily skipping failing tests")
|
||||
def test_char_pointer_conversion():
|
||||
import warnings
|
||||
assert __version__.startswith(("1.8", "1.9", "1.10", "1.11")), (
|
||||
--- a/testing/cffi0/backend_tests.py
|
||||
+++ b/testing/cffi0/backend_tests.py
|
||||
@@ -1381,6 +1381,7 @@ class BackendTests:
|
||||
assert ffi.getctype("pe") == 'e *'
|
||||
assert ffi.getctype("e1*") == 'e1 *'
|
||||
|
||||
+ @py.test.mark.skip(reason="Temporarily skipping failing tests")
|
||||
def test_opaque_enum(self):
|
||||
import warnings
|
||||
ffi = FFI(backend=self.Backend())
|
||||
@@ -1899,6 +1900,7 @@ class BackendTests:
|
||||
assert res == 42
|
||||
assert seen == [1, 1]
|
||||
|
||||
+ @py.test.mark.skip(reason="Temporarily skipping failing tests")
|
||||
def test_init_once_multithread(self):
|
||||
import sys, time
|
||||
if sys.version_info < (3,):
|
||||
--- a/testing/cffi1/test_ffi_obj.py
|
||||
+++ b/testing/cffi1/test_ffi_obj.py
|
||||
@@ -440,6 +440,7 @@ def test_init_once():
|
||||
assert res == 42
|
||||
assert seen == [1, 1]
|
||||
|
||||
+@py.test.mark.skip(reason="Temporarily skipping failing tests")
|
||||
def test_init_once_multithread():
|
||||
if sys.version_info < (3,):
|
||||
import thread
|
||||
@@ -474,6 +475,7 @@ def test_init_once_failure():
|
||||
py.test.raises(ValueError, ffi.init_once, do_init, "tag")
|
||||
assert seen == [1] * (i + 1)
|
||||
|
||||
+@py.test.mark.skip(reason="Temporarily skipping failing tests")
|
||||
def test_init_once_multithread_failure():
|
||||
if sys.version_info < (3,):
|
||||
import thread
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 19 20:43:08 CEST 2018 - mcepl@suse.com
|
||||
|
||||
- Remove ignore-tests.patch -- testing what will happen
|
||||
- Add e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch from
|
||||
upstream to remove some warnings.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 18 15:51:02 UTC 2018 - Matěj Cepl <mcepl@suse.com>
|
||||
|
||||
|
@@ -27,7 +27,7 @@ URL: http://cffi.readthedocs.org
|
||||
Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
|
||||
Source1: python-cffi-rpmlintrc
|
||||
# https://bitbucket.org/cffi/cffi/issues/384/
|
||||
Patch0: ignore-tests.patch
|
||||
Patch0: e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pycparser}
|
||||
BuildRequires: %{python_module pytest}
|
||||
|
Reference in New Issue
Block a user