summaryrefslogtreecommitdiff
path: root/testing/cffi1/test_zdist.py
diff options
context:
space:
mode:
authorMiro Hrončok <miro@hroncok.cz>2022-11-11 14:51:14 +0100
committerMiro Hrončok <miro@hroncok.cz>2022-11-11 14:51:14 +0100
commitbabc98d98570b5dbb85fb1c58b012aafa9769696 (patch)
treeced2689aa8dcc7f36546160934fcc5de82e41c19 /testing/cffi1/test_zdist.py
parent5ddf2accf50f05c8962c0c38211b0ad73412be71 (diff)
downloadcffi-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_zdist.py')
-rw-r--r--testing/cffi1/test_zdist.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/testing/cffi1/test_zdist.py b/testing/cffi1/test_zdist.py
index efc1d86..58d5bc8 100644
--- a/testing/cffi1/test_zdist.py
+++ b/testing/cffi1/test_zdist.py
@@ -1,4 +1,5 @@
-import sys, os, py
+import sys, os
+import pytest
import subprocess
import cffi
from testing.udir import udir
@@ -56,7 +57,7 @@ class TestDist(object):
try:
import setuptools
except ImportError:
- py.test.skip("setuptools not found")
+ pytest.skip("setuptools not found")
if os.path.exists(os.path.join(self.rootdir, 'setup.py')):
self.run(['setup.py', 'egg_info'], cwd=self.rootdir)
TestDist._setuptools_ready = True
@@ -115,7 +116,7 @@ class TestDist(object):
def test_abi_emit_python_code_2(self):
ffi = cffi.FFI()
ffi.set_source("package_name_1.mymod", None)
- py.test.raises(IOError, ffi.emit_python_code, 'unexisting/xyz.py')
+ pytest.raises(IOError, ffi.emit_python_code, 'unexisting/xyz.py')
@from_outside
def test_abi_emit_python_code_3(self):
@@ -162,7 +163,7 @@ class TestDist(object):
def test_api_emit_c_code_2(self):
ffi = cffi.FFI()
ffi.set_source("package_name_1.mymod", "/*code would be here*/")
- py.test.raises(IOError, ffi.emit_c_code, 'unexisting/xyz.c')
+ pytest.raises(IOError, ffi.emit_c_code, 'unexisting/xyz.c')
@from_outside
def test_api_emit_c_code_3(self):