Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r3171:828c24a88bf6 Date: 2018-11-21 07:49 +0200 http://bitbucket.org/cffi/cffi/changeset/828c24a88bf6/
Log: Add compatibility with pytest 4.0 without breaking older pytests diff --git a/testing/cffi1/test_parse_c_type.py b/testing/cffi1/test_parse_c_type.py --- a/testing/cffi1/test_parse_c_type.py +++ b/testing/cffi1/test_parse_c_type.py @@ -3,7 +3,12 @@ from cffi import cffi_opcode if '__pypy__' in sys.builtin_module_names: - py.test.skip("not available on pypy") + try: + # pytest >= 4.0 + py.test.skip("not available on pypy", allow_module_level=True) + except TypeError: + # older pytest + py.test.skip("not available on pypy") cffi_dir = os.path.dirname(cffi_opcode.__file__) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit