update pybind11

This commit is contained in:
Thomas Kunze
2024-09-14 19:39:30 +02:00
parent 1f406abbd4
commit e15da8451b
126 changed files with 15755 additions and 24148 deletions

View File

@@ -228,3 +228,10 @@ def test_buffer_docstring():
m.get_buffer_info.__doc__.strip()
== "get_buffer_info(arg0: Buffer) -> pybind11_tests.buffers.buffer_info"
)
def test_buffer_exception():
with pytest.raises(BufferError, match="Error getting buffer") as excinfo:
memoryview(m.BrokenMatrix(1, 1))
assert isinstance(excinfo.value.__cause__, RuntimeError)
assert "for context" in str(excinfo.value.__cause__)