示例#1
0
def test_clone_merge_no_merge_literals():
    a, b, c = as_apply((2, 3, 2))
    d = (a + b) * (c + b)
    len_d = len(dfs(d))
    e = clone_merge(d, merge_literals=False)
    assert len_d == len(dfs(d))
    assert len_d == len(dfs(e))
    assert e.eval() == d.eval()
示例#2
0
def test_clone_merge_no_merge_literals():
    a, b, c = as_apply((2, 3, 2))
    d = (a + b) * (c + b)
    len_d = len(dfs(d))
    e = clone_merge(d, merge_literals=False)
    assert len_d == len(dfs(d))
    assert len_d == len(dfs(e))
    assert e.eval() == d.eval()