mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-27 10:13:16 +00:00
cast pointer to std::tuple and std::pair (#2334)
This commit is contained in:
@@ -250,6 +250,8 @@ def test_tuple(doc):
|
||||
assert m.rvalue_nested() == ("rvalue", ("rvalue", ("rvalue", "rvalue")))
|
||||
assert m.lvalue_nested() == ("lvalue", ("lvalue", ("lvalue", "lvalue")))
|
||||
|
||||
assert m.int_string_pair() == (2, "items")
|
||||
|
||||
|
||||
def test_builtins_cast_return_none():
|
||||
"""Casters produced with PYBIND11_TYPE_CASTER() should convert nullptr to None"""
|
||||
@@ -258,6 +260,7 @@ def test_builtins_cast_return_none():
|
||||
assert m.return_none_bool() is None
|
||||
assert m.return_none_int() is None
|
||||
assert m.return_none_float() is None
|
||||
assert m.return_none_pair() is None
|
||||
|
||||
|
||||
def test_none_deferred():
|
||||
|
||||
Reference in New Issue
Block a user