Add support for GraalPy (#5380)

* 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
This commit is contained in:
Michael Šimáček
2024-10-07 23:12:04 +02:00
committed by GitHub
parent 7e418f4924
commit c4a05f9344
42 changed files with 211 additions and 66 deletions

View File

@@ -2,10 +2,12 @@ from __future__ import annotations
import pytest
import env # noqa: F401
from pybind11_tests import ConstructorStats
from pybind11_tests import operators as m
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
def test_operator_overloading():
v1 = m.Vector2(1, 2)
v2 = m.Vector(3, -1)
@@ -83,6 +85,7 @@ def test_operator_overloading():
assert cstats.move_assignments == 0
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
def test_operators_notimplemented():
"""#393: need to return NotSupported to ensure correct arithmetic operator behavior"""