From 5b720e63b6f2b7672758356fc971616c96b0da1e24815df3cb4664384ce0ec71 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 17 Oct 2018 16:45:01 +0000 Subject: [PATCH] Fix py.test calling OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=54 --- python-cffi.spec | 12 +----------- test_cos_01.py | 6 ------ test_cos_02.py | 6 ------ 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 test_cos_01.py delete mode 100644 test_cos_02.py diff --git a/python-cffi.spec b/python-cffi.spec index 06292bc..624bdc5 100644 --- a/python-cffi.spec +++ b/python-cffi.spec @@ -26,8 +26,6 @@ Group: Development/Languages/Python URL: http://cffi.readthedocs.org Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz Source1: python-cffi-rpmlintrc -Source2: test_cos_01.py -Source3: test_cos_02.py # https://bitbucket.org/cffi/cffi/issues/384/ Patch0: e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch # https://bitbucket.org/cffi/cffi/issues/378 @@ -52,9 +50,6 @@ is to provide a convenient and reliable way of calling C code from Python. %setup -q -n cffi-%{version} %autopatch -p1 -cp -v -p %{SOURCE2} . -cp -v -p %{SOURCE3} . - %build export CFLAGS="%{optflags}" %python_build @@ -66,13 +61,8 @@ export CFLAGS="%{optflags}" %check # https://bitbucket.org/cffi/cffi/issues/390/ %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} -py.test-%$python_bin_suffix -k test_dlopen_filename -W ignore::UserWarning c/ testing/ +py.test-%$python_bin_suffix -v -k 'not test_dlopen' -W ignore::UserWarning c/ testing/ } -export PYTHONPATH=%{buildroot}%{python2_sitearch} -echo "Testing test_cos_01.py" -python2 test_cos_01.py -echo "Testing test_cos_02.py" -python2 test_cos_02.py %files %{python_files} %license LICENSE diff --git a/test_cos_01.py b/test_cos_01.py deleted file mode 100644 index 216d4f5..0000000 --- a/test_cos_01.py +++ /dev/null @@ -1,6 +0,0 @@ -import cffi, ctypes.util -ctypes.util.find_library('m') -ffi = cffi.FFI() -ffi.cdef("double cos(double);") -print(ffi.dlopen('m').cos(1.23)) -print(ffi.dlopen('libm.so.6').cos(1.23)) diff --git a/test_cos_02.py b/test_cos_02.py deleted file mode 100644 index 023f2fc..0000000 --- a/test_cos_02.py +++ /dev/null @@ -1,6 +0,0 @@ -import cffi, ctypes.util -ctypes.util.find_library('m') -ffi = cffi.FFI() -ffi.cdef("double cos(double);") -print(ffi.dlopen('libm.so.6').cos(1.23)) -print(ffi.dlopen('m').cos(1.23))