mirror of
https://github.com/pybind/pybind11.git
synced 2026-07-14 19:17:12 +00:00
PYPY, GRAALPY: skip last part of test_weak_ptr_base
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
import env # noqa: F401
|
||||
import env
|
||||
import pybind11_tests.class_sh_trampoline_weak_ptr as m
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ class PyDrvd(m.VirtBase):
|
||||
return 200
|
||||
|
||||
|
||||
@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")
|
||||
@pytest.mark.parametrize(("vtype", "expected_code"), [(m.VirtBase, 100), (PyDrvd, 200)])
|
||||
def test_weak_ptr_base(vtype, expected_code):
|
||||
wpo = m.WpOwner()
|
||||
@@ -27,4 +26,6 @@ def test_weak_ptr_base(vtype, expected_code):
|
||||
assert wpo.get_code() == -999 # THIS NEEDS FIXING (issue #5623)
|
||||
|
||||
del obj
|
||||
if env.PYPY or env.GRAALPY:
|
||||
pytest.skip("Cannot reliably trigger GC")
|
||||
assert wpo.get_code() == -999
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
import env # noqa: F401
|
||||
import env
|
||||
import pybind11_tests.class_sp_trampoline_weak_ptr as m
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ class PyDrvd(m.VirtBase):
|
||||
return 200
|
||||
|
||||
|
||||
@pytest.mark.skipif("env.GRAALPY", reason="Cannot reliably trigger GC")
|
||||
@pytest.mark.parametrize(("vtype", "expected_code"), [(m.VirtBase, 100), (PyDrvd, 200)])
|
||||
def test_weak_ptr_base(vtype, expected_code):
|
||||
wpo = m.WpOwner()
|
||||
@@ -24,4 +23,6 @@ def test_weak_ptr_base(vtype, expected_code):
|
||||
assert wpo.get_code() == expected_code
|
||||
|
||||
del obj
|
||||
if env.PYPY or env.GRAALPY:
|
||||
pytest.skip("Cannot reliably trigger GC")
|
||||
assert wpo.get_code() == -999
|
||||
|
||||
Reference in New Issue
Block a user