예제 #1
0
def test_flattencopy():
    """py.test for flattencopy"""
    tdata = (([1,2], [1,2]), #lst , nlst
    ([1,2,[3,4]], [1,2,3,4]), #lst , nlst
    ([1,2,[3,[4,5,6],7,8]], [1,2,3,4,5,6,7,8]), #lst , nlst
    ([1,2,[3,[4,5,[6,7],8],9]], [1,2,3,4,5,6,7,8,9]), #lst , nlst
    )
    for lst , nlst in tdata:
        result = hvacbuilder.flattencopy(lst)
        assert result == nlst
예제 #2
0
def test_flattencopy():
    """py.test for flattencopy"""
    tdata = (
        ([1, 2], [1, 2]),  #lst , nlst
        ([1, 2, [3, 4]], [1, 2, 3, 4]),  #lst , nlst
        ([1, 2, [3, [4, 5, 6], 7, 8]], [1, 2, 3, 4, 5, 6, 7, 8]),  #lst , nlst
        ([1, 2, [3, [4, 5, [6, 7], 8], 9]], [1, 2, 3, 4, 5, 6, 7, 8, 9]),
        #lst , nlst
    )
    for lst, nlst in tdata:
        result = hvacbuilder.flattencopy(lst)
        assert result == nlst