diff options
author | Miro Hrončok <miro@hroncok.cz> | 2022-11-11 14:51:14 +0100 |
---|---|---|
committer | Miro Hrončok <miro@hroncok.cz> | 2022-11-11 14:51:14 +0100 |
commit | babc98d98570b5dbb85fb1c58b012aafa9769696 (patch) | |
tree | ced2689aa8dcc7f36546160934fcc5de82e41c19 /testing/cffi0/test_ctypes.py | |
parent | 5ddf2accf50f05c8962c0c38211b0ad73412be71 (diff) | |
download | cffi-babc98d98570b5dbb85fb1c58b012aafa9769696.tar.gz |
Replace py.test usage with pytest, explicitly require py for testspy.test
pytest 7.2+ no longer depends on py. It ships py.path and py.error only.
See https://docs.pytest.org/en/7.2.x/changelog.html#deprecations
The tests use py.code as well, hence we declare and document a test dependency on py.
Diffstat (limited to 'testing/cffi0/test_ctypes.py')
-rw-r--r-- | testing/cffi0/test_ctypes.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/testing/cffi0/test_ctypes.py b/testing/cffi0/test_ctypes.py index a70c8f0..2a3b84f 100644 --- a/testing/cffi0/test_ctypes.py +++ b/testing/cffi0/test_ctypes.py @@ -1,4 +1,5 @@ -import py, sys +import sys +import pytest from testing.cffi0 import backend_tests from cffi.backend_ctypes import CTypesBackend @@ -11,33 +12,33 @@ class TestCTypes(backend_tests.BackendTests): TypeRepr = "<class 'ffi.CData<%s>'>" def test_array_of_func_ptr(self): - py.test.skip("ctypes backend: not supported: " + pytest.skip("ctypes backend: not supported: " "initializers for function pointers") def test_structptr_argument(self): - py.test.skip("ctypes backend: not supported: passing a list " + pytest.skip("ctypes backend: not supported: passing a list " "for a pointer argument") def test_array_argument_as_list(self): - py.test.skip("ctypes backend: not supported: passing a list " + pytest.skip("ctypes backend: not supported: passing a list " "for a pointer argument") def test_cast_to_array_type(self): - py.test.skip("ctypes backend: not supported: casting to array") + pytest.skip("ctypes backend: not supported: casting to array") def test_nested_anonymous_struct(self): - py.test.skip("ctypes backend: not supported: nested anonymous struct") + pytest.skip("ctypes backend: not supported: nested anonymous struct") def test_nested_field_offset_align(self): - py.test.skip("ctypes backend: not supported: nested anonymous struct") + pytest.skip("ctypes backend: not supported: nested anonymous struct") def test_nested_anonymous_union(self): - py.test.skip("ctypes backend: not supported: nested anonymous union") + pytest.skip("ctypes backend: not supported: nested anonymous union") def test_nested_anonymous_struct_2(self): - py.test.skip("ctypes backend: not supported: nested anonymous union") + pytest.skip("ctypes backend: not supported: nested anonymous union") def test_CData_CType_2(self): if sys.version_info >= (3,): - py.test.skip("ctypes backend: not supported in Python 3: CType") + pytest.skip("ctypes backend: not supported in Python 3: CType") backend_tests.BackendTests.test_CData_CType_2(self) |