mirror of
https://github.com/thelsing/knx.git
synced 2026-02-23 13:50:35 +01:00
update pybind11
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user