summaryrefslogtreecommitdiff
path: root/testing/cffi1/test_parse_c_type.py
diff options
context:
space:
mode:
authorArmin Rigo <armin.rigo@gmail.com>2022-11-13 09:12:17 +0000
committerArmin Rigo <armin.rigo@gmail.com>2022-11-13 09:12:17 +0000
commitea92abe896f3763205bd281a40824b89746bebb3 (patch)
treeced2689aa8dcc7f36546160934fcc5de82e41c19 /testing/cffi1/test_parse_c_type.py
parent5ddf2accf50f05c8962c0c38211b0ad73412be71 (diff)
parentbabc98d98570b5dbb85fb1c58b012aafa9769696 (diff)
downloadcffi-ea92abe896f3763205bd281a40824b89746bebb3.tar.gz
Merge branch 'branch/py.test' into 'branch/default'
Replace py.test usage with pytest, explicitly require py for tests See merge request pypy/cffi!115
Diffstat (limited to 'testing/cffi1/test_parse_c_type.py')
-rw-r--r--testing/cffi1/test_parse_c_type.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/testing/cffi1/test_parse_c_type.py b/testing/cffi1/test_parse_c_type.py
index a9f5fcb..fa1f36c 100644
--- a/testing/cffi1/test_parse_c_type.py
+++ b/testing/cffi1/test_parse_c_type.py
@@ -1,14 +1,15 @@
-import sys, re, os, py
+import sys, re, os
+import pytest
import cffi
from cffi import cffi_opcode
if '__pypy__' in sys.builtin_module_names:
try:
# pytest >= 4.0
- py.test.skip("not available on pypy", allow_module_level=True)
+ pytest.skip("not available on pypy", allow_module_level=True)
except TypeError:
# older pytest
- py.test.skip("not available on pypy")
+ pytest.skip("not available on pypy")
cffi_dir = os.path.dirname(cffi_opcode.__file__)
@@ -130,7 +131,7 @@ def parsex(input):
return ' '.join(map(str_if_int, result))
def parse_error(input, expected_msg, expected_location):
- e = py.test.raises(ParseError, parse, input)
+ e = pytest.raises(ParseError, parse, input)
assert e.value.args[0] == expected_msg
assert e.value.args[1] == expected_location