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

Function test_boost_histogram_apply_custom_transform

tests/test_callbacks.py:239–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237
238
239def test_boost_histogram_apply_custom_transform():
240 ctd = m.boost_histogram_custom_transform_double
241 cti = m.boost_histogram_custom_transform_int
242 apply = m.boost_histogram_apply_custom_transform
243 assert apply(ctd, 5) == 15
244 assert apply(cti, 0) == -200
245 assert apply(None, 0) == -100
246 assert apply(lambda value: value, 9) == -200
247 assert apply({}, 0) == -100
248 assert apply("", 0) == -100

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected