MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_vec_of_reference_wrapper

Function test_vec_of_reference_wrapper

tests/test_stl.py:375–380  ·  view source on GitHub ↗

#171: Can't return reference wrappers (or STL structures containing them)

()

Source from the content-addressed store, hash-verified

373
374
375def test_vec_of_reference_wrapper():
376 """#171: Can't return reference wrappers (or STL structures containing them)"""
377 assert (
378 str(m.return_vec_of_reference_wrapper(UserType(4)))
379 == "[UserType(1), UserType(2), UserType(3), UserType(4)]"
380 )
381
382
383def test_stl_pass_by_pointer(msg):

Callers

nothing calls this directly

Calls 2

UserTypeClass · 0.90
strClass · 0.85

Tested by

no test coverage detected