pybind11/tests/test_class_sh_property_non_owning.py
Ralf W. Grosse-Kunstleve cc86fb3256 test_class_sh_property_non_owning.py appears to cause memory corruption leading to failures in test_class_sh_shared_ptr_copy_move.py:
* Disable all tests in test_class_sh_property_non_owning.py

* Disable only `test_properties()` in test_class_sh_shared_ptr_copy_move.py

* Go back to original .github/workflows/ci.yml
2024-07-08 15:18:17 -07:00

32 lines
1.0 KiB
Python

from __future__ import annotations
import pytest
from pybind11_tests import class_sh_property_non_owning as m
@pytest.mark.parametrize("persistent_holder", [True, False])
@pytest.mark.parametrize(
("core_fld", "expected"),
[
("core_fld_value_ro", (13, 24)),
("core_fld_value_rw", (13, 24)),
("core_fld_shared_ptr_ro", (14, 25)),
("core_fld_shared_ptr_rw", (14, 25)),
("core_fld_raw_ptr_ro", (14, 25)),
("core_fld_raw_ptr_rw", (14, 25)),
("core_fld_unique_ptr_rw", (15, 26)),
],
)
def test_core_fld_common(core_fld, expected, persistent_holder):
pytest.skip("BAKEIN_BREAK: Segmentation Faults here or in subsequent tests.")
if persistent_holder:
h = m.DataFieldsHolder(2)
for i, exp in enumerate(expected):
c = getattr(h.vec_at(i), core_fld)
assert c.int_value == exp
else:
for i, exp in enumerate(expected):
c = getattr(m.DataFieldsHolder(2).vec_at(i), core_fld)
assert c.int_value == exp