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/cffi1/test_realize_c_type.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/cffi1/test_realize_c_type.py')
-rw-r--r-- | testing/cffi1/test_realize_c_type.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/cffi1/test_realize_c_type.py b/testing/cffi1/test_realize_c_type.py index a1f31e6..824beaf 100644 --- a/testing/cffi1/test_realize_c_type.py +++ b/testing/cffi1/test_realize_c_type.py @@ -1,4 +1,5 @@ -import py, sys +import sys +import pytest from cffi import cffi_opcode @@ -10,7 +11,7 @@ def check(input, expected_output=None, expected_ffi_error=False): assert isinstance(ct, ffi.CType) assert ct.cname == (expected_output or input) else: - e = py.test.raises(ffi.error, ffi.typeof, input) + e = pytest.raises(ffi.error, ffi.typeof, input) if isinstance(expected_ffi_error, str): assert str(e.value) == expected_ffi_error |