Skip to content

Commit

Permalink
tests: Test capitaliation of py::sequence and py::buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
sizmailov committed Sep 1, 2023
1 parent d3d700d commit 46a7dd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_buffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,7 @@ def test_ctypes_from_buffer():
assert cinfo.shape == pyinfo.shape
assert cinfo.strides == pyinfo.strides
assert not cinfo.readonly


def test_buffer_docstring():
assert m.get_buffer_info.__doc__.strip() == "get_buffer_info(arg0: Buffer) -> pybind11_tests.buffers.buffer_info"
4 changes: 4 additions & 0 deletions tests/test_sequences_and_iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ def __len__(self):
assert m.sequence_length("hello") == 5


def test_sequence_doc():
assert m.sequence_length.__doc__.strip() == "sequence_length(arg0: Sequence) -> int"


def test_map_iterator():
sm = m.StringMap({"hi": "bye", "black": "white"})
assert sm["hi"] == "bye"
Expand Down

0 comments on commit 46a7dd4

Please sign in to comment.