mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-24 14:15:11 +00:00
c4a05f9344
* Initial support for GraalPy * Mark tests that currently fail on GraalPy with xfail * Add graalpy to CI * Limit test deps on graalpy to available binary wheels * Skip cmake test installed_function on GraalPy CMake won't find libpython on GraalPy, it either fails or silently picks CPython's libpython. * Factor out setting function docstrings into a macro * Try to narrow down skipped tests
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
import platform
|
|
import sys
|
|
import sysconfig
|
|
|
|
import pytest
|
|
|
|
LINUX = sys.platform.startswith("linux")
|
|
MACOS = sys.platform.startswith("darwin")
|
|
WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin")
|
|
|
|
CPYTHON = platform.python_implementation() == "CPython"
|
|
PYPY = platform.python_implementation() == "PyPy"
|
|
GRAALPY = sys.implementation.name == "graalpy"
|
|
PY_GIL_DISABLED = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
|
|
|
|
|
|
def deprecated_call():
|
|
"""
|
|
pytest.deprecated_call() seems broken in pytest<3.9.x; concretely, it
|
|
doesn't work on CPython 3.8.0 with pytest==3.3.2 on Ubuntu 18.04 (#2922).
|
|
|
|
This is a narrowed reimplementation of the following PR :(
|
|
https://github.com/pytest-dev/pytest/pull/4104
|
|
"""
|
|
# TODO: Remove this when testing requires pytest>=3.9.
|
|
pieces = pytest.__version__.split(".")
|
|
pytest_major_minor = (int(pieces[0]), int(pieces[1]))
|
|
if pytest_major_minor < (3, 9):
|
|
return pytest.warns((DeprecationWarning, PendingDeprecationWarning))
|
|
return pytest.deprecated_call()
|