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

Function test_pass_std_map_int

tests/test_stl.py:563–576  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

561
562
563def test_pass_std_map_int():
564 fn = m.pass_std_map_int
565 assert fn({1: 2, 3: 4}) == 4506
566 with pytest.raises(TypeError):
567 fn([])
568 assert fn(FakePyMappingWithItems()) == 3507
569 with pytest.raises(TypeError):
570 fn(FakePyMappingMissingItems())
571 with pytest.raises(TypeError):
572 fn(FakePyMappingBadItems())
573 with pytest.raises(TypeError):
574 fn(FakePyMappingItemsNotCallable())
575 with pytest.raises(TypeError):
576 fn(FakePyMappingItemsWithArg())
577
578
579@pytest.mark.parametrize(

Callers

nothing calls this directly

Tested by

no test coverage detected