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

Function test_set

tests/test_stl.py:94–103  ·  view source on GitHub ↗

std::set <-> set

(doc)

Source from the content-addressed store, hash-verified

92
93
94def test_set(doc):
95 """std::set <-> set"""
96 s = m.cast_set()
97 assert s == {"key1", "key2"}
98 s.add("key3")
99 assert m.load_set(s)
100 assert m.load_set(frozenset(s))
101
102 assert doc(m.cast_set) == "cast_set() -> set[str]"
103 assert doc(m.load_set) == "load_set(arg0: collections.abc.Set[str]) -> bool"
104
105
106def test_recursive_casting():

Callers

nothing calls this directly

Calls 2

docFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected