def test_buildo(): x = var('x') assert results( buildo('add', (1, 2, 3), x), {}) == ({x: ('add', 1, 2, 3)}, ) assert results( buildo(x, (1, 2, 3), ('add', 1, 2, 3)), {}) == ({x: 'add'}, ) assert results( buildo('add', x, ('add', 1, 2, 3)), {}) == ({x: (1, 2, 3)}, )
def test_buildo_object(): x = var('x') assert results(buildo(add, (1,2,3), x, op_registry), {}) == \ ({x: add(1, 2, 3)},) print results(buildo(x, (1,2,3), add(1,2,3), op_registry), {}) assert results(buildo(x, (1,2,3), add(1,2,3), op_registry), {}) == \ ({x: add},) assert results(buildo(add, x, add(1,2,3), op_registry), {}) == \ ({x: (1,2,3)},)
def test_buildo_object(): x = var('x') assert results(buildo(Add, (1, 2, 3), x), {}) == \ ({x: add(1, 2, 3)}, ) print(results(buildo(x, (1, 2, 3), add(1, 2, 3)), {})) assert results(buildo(x, (1, 2, 3), add(1, 2, 3)), {}) == \ ({x: Add}, ) assert results(buildo(Add, x, add(1, 2, 3)), {}) == \ ({x: (1, 2, 3)}, )
def test_buildo_object(): x = var('x') assert results(buildo(Add, (1,2,3), x), {}) == \ ({x: add(1, 2, 3)},) print(results(buildo(x, (1, 2, 3), add(1, 2, 3)), {})) assert results(buildo(x, (1,2,3), add(1,2,3)), {}) == \ ({x: Add},) assert results(buildo(Add, x, add(1,2,3)), {}) == \ ({x: (1,2,3)},)
def test_buildo(): x = var('x') assert results(buildo('add', (1, 2, 3), x), {}) == ({ x: ('add', 1, 2, 3) }, ) assert results(buildo(x, (1, 2, 3), ('add', 1, 2, 3)), {}) == ({ x: 'add' }, ) assert results(buildo('add', x, ('add', 1, 2, 3)), {}) == ({ x: (1, 2, 3) }, )