Skip to content

Commit 46a7dd4

Browse files
committed
tests: Test capitaliation of py::sequence and py::buffer
1 parent d3d700d commit 46a7dd4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/test_buffers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,7 @@ def test_ctypes_from_buffer():
219219
assert cinfo.shape == pyinfo.shape
220220
assert cinfo.strides == pyinfo.strides
221221
assert not cinfo.readonly
222+
223+
224+
def test_buffer_docstring():
225+
assert m.get_buffer_info.__doc__.strip() == "get_buffer_info(arg0: Buffer) -> pybind11_tests.buffers.buffer_info"

tests/test_sequences_and_iterators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ def __len__(self):
171171
assert m.sequence_length("hello") == 5
172172

173173

174+
def test_sequence_doc():
175+
assert m.sequence_length.__doc__.strip() == "sequence_length(arg0: Sequence) -> int"
176+
177+
174178
def test_map_iterator():
175179
sm = m.StringMap({"hi": "bye", "black": "white"})
176180
assert sm["hi"] == "bye"

0 commit comments

Comments
 (0)