MCPcopy
hub / github.com/hyperopt/hyperopt / test_as_apply_dict_of_literals

Function test_as_apply_dict_of_literals

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

Source from the content-addressed store, hash-verified

81
82
83def test_as_apply_dict_of_literals():
84 d = {"a": 9, "b": 10}
85 ad = as_apply(d)
86 assert isinstance(ad, Apply)
87 assert ad.name == "dict"
88 assert len(ad) == 2
89 assert ad.named_args[0][0] == "a"
90 assert ad.named_args[0][1]._obj == 9
91 assert ad.named_args[1][0] == "b"
92 assert ad.named_args[1][1]._obj == 10
93
94
95def test_as_apply_dict_of_applies():

Callers

nothing calls this directly

Calls 1

as_applyFunction · 0.90

Tested by

no test coverage detected