MCPcopy
hub / github.com/hyperopt/hyperopt / test_as_apply_dict_of_applies

Function test_as_apply_dict_of_applies

hyperopt/pyll/tests/test_base.py:95–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93
94
95def test_as_apply_dict_of_applies():
96 d = {"a": as_apply(9), "b": as_apply(10)}
97 ad = as_apply(d)
98 assert isinstance(ad, Apply)
99 assert ad.name == "dict"
100 assert len(ad) == 2
101 assert ad.named_args[0][0] == "a"
102 assert ad.named_args[0][1]._obj == 9
103 assert ad.named_args[1][0] == "b"
104 assert ad.named_args[1][1]._obj == 10
105
106
107def test_as_apply_nested_dict():

Callers

nothing calls this directly

Calls 1

as_applyFunction · 0.90

Tested by

no test coverage detected