def test_dict(): expected = 13 with pf.Graph() as graph: a = pf.constant(expected) b = pf.identity({'foo': a}) actual = graph(b)['foo'] assert actual is expected, "expected %s but got %s" % (expected, actual)
def test_list(): expected = 13 with pf.Graph() as graph: a = pf.constant(expected) b = pf.identity([a, a]) actual, _ = graph(b) assert actual is expected, "expected %s but got %s" % (expected, actual)