update pybind11

This commit is contained in:
Thomas Kunze
2024-06-29 16:50:08 +02:00
249 changed files with 31681 additions and 11123 deletions

View File

@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import annotations
import pytest
m = pytest.importorskip("pybind11_tests.constants_and_functions")
@@ -40,3 +41,18 @@ def test_exception_specifiers():
assert m.f2(53) == 55
assert m.f3(86) == 89
assert m.f4(140) == 144
def test_function_record_leaks():
class RaisingRepr:
def __repr__(self):
raise RuntimeError("Surprise!")
with pytest.raises(RuntimeError):
m.register_large_capture_with_invalid_arguments(m)
with pytest.raises(RuntimeError):
m.register_with_raising_repr(m, RaisingRepr())
def test_noexcept_lambda():
assert m.l1() == 0