summaryrefslogtreecommitdiff
path: root/testing/cffi1/test_pkgconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/cffi1/test_pkgconfig.py')
-rw-r--r--testing/cffi1/test_pkgconfig.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/cffi1/test_pkgconfig.py b/testing/cffi1/test_pkgconfig.py
index c725cca..40e0059 100644
--- a/testing/cffi1/test_pkgconfig.py
+++ b/testing/cffi1/test_pkgconfig.py
@@ -1,6 +1,6 @@
import sys
import subprocess
-import py
+import pytest
import cffi.pkgconfig as pkgconfig
from cffi import PkgConfigError
@@ -62,15 +62,15 @@ def test_call():
pkgconfig.subprocess = mock_subprocess
mock_subprocess.RESULT = None
- e = py.test.raises(PkgConfigError, pkgconfig.call, "libfoo", "--cflags")
+ e = pytest.raises(PkgConfigError, pkgconfig.call, "libfoo", "--cflags")
assert str(e.value) == "cannot run pkg-config: oops can't run"
mock_subprocess.RESULT = b"", "Foo error!\n", 1
- e = py.test.raises(PkgConfigError, pkgconfig.call, "libfoo", "--cflags")
+ e = pytest.raises(PkgConfigError, pkgconfig.call, "libfoo", "--cflags")
assert str(e.value) == "Foo error!"
mock_subprocess.RESULT = b"abc\\def\n", "", 0
- e = py.test.raises(PkgConfigError, pkgconfig.call, "libfoo", "--cflags")
+ e = pytest.raises(PkgConfigError, pkgconfig.call, "libfoo", "--cflags")
assert str(e.value).startswith("pkg-config --cflags libfoo returned an "
"unsupported backslash-escaped output:")
@@ -84,7 +84,7 @@ def test_call():
if sys.version_info >= (3,):
mock_subprocess.RESULT = b"\xff\n", "", 0
- e = py.test.raises(PkgConfigError, pkgconfig.call,
+ e = pytest.raises(PkgConfigError, pkgconfig.call,
"libfoo", "--cflags", encoding="utf-8")
assert str(e.value) == (
"pkg-config --cflags libfoo returned bytes that cannot be "