mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
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:
@@ -39,6 +39,9 @@ def test_reference_internal():
|
||||
assert str(b.get_a2()) == "A[43]"
|
||||
assert str(b.a2) == "A[43]"
|
||||
|
||||
if env.GRAALPY:
|
||||
pytest.skip("ConstructorStats is incompatible with GraalPy.")
|
||||
|
||||
astats, bstats = ConstructorStats.get(ms.A), ConstructorStats.get(ms.B)
|
||||
assert astats.alive() == 2
|
||||
assert bstats.alive() == 1
|
||||
@@ -97,9 +100,9 @@ def test_def_submodule_failures():
|
||||
sm = m.def_submodule(m, b"ScratchSubModuleName") # Using bytes to show it works.
|
||||
assert sm.__name__ == m.__name__ + "." + "ScratchSubModuleName"
|
||||
malformed_utf8 = b"\x80"
|
||||
if env.PYPY:
|
||||
if env.PYPY or env.GRAALPY:
|
||||
# It is not worth the effort finding a trigger for a failure when running with PyPy.
|
||||
pytest.skip("Sufficiently exercised on platforms other than PyPy.")
|
||||
pytest.skip("Sufficiently exercised on platforms other than PyPy/GraalPy.")
|
||||
else:
|
||||
# Meant to trigger PyModule_GetName() failure:
|
||||
sm_name_orig = sm.__name__
|
||||
|
||||
Reference in New Issue
Block a user