示例#1
0
def test_rollback():
    ds = OperationGraph([
        MO('A', 'B'), MO('Bc', 'b', True),
        MO('B', 'C'), MO('Cd', 'c', True),
        MO('C', 'D'), MO('De', 'd', True),
        MO('D', 'E'), MO('E', 'e', True),
    ])
    s = a2d('ABCDE'), a2d('b')
    # print(ds.to_dot(*s))
    ds.resolve(*s)
示例#2
0
def test_basic():
    ds = OperationGraph([
        MO('A', 'B', True),
        MO('C', 'D'),
        MO('BD', 'E'),
        MO('X', 'Y'),
        MO('Y', 'Z'),
    ])
    s = (a2d('ACX'), a2d('EZ'))
    # print(ds.to_dot(*s))
    ds.resolve(*s)
示例#3
0
def test_forkjoin_revert():
    ds = OperationGraph([
        MO('A', 'B'), MO('Bc', 'b', True),
        MO('B', 'C'), MO('Cd', 'c', True),
        MO('C', 'D'), MO('Def', 'd', True),
        MO('D', 'E'), MO('Em', 'e', True),
        MO('D', 'F'), MO('Fm', 'f', True),
        MO('EF', 'M'), MO('Mn', 'm', True),
        MO('M', 'N'), MO('N', 'n', True),
    ])
    s = (a2d('ABCDEFMN'), a2d('d'))
    # print(ds.to_dot(*s))
    ds.resolve(*s)
示例#4
0
def test_ahead():
    ds = OperationGraph([
        MO('A', 'B'), MO('Bc', 'b', True),
        MO('B', 'C'), MO('Cd', 'c', True),
        MO('C', 'D'), MO('De', 'd', True),
        MO('D', 'E'), MO('E', 'e', True),

        MO('B', 'X'), MO('Xby', 'x', True),
        MO('X', 'Y'), MO('Yz', 'y', True),
        MO('Y', 'Z'), MO('Z', 'z', True),
    ])
    s = (a2d('ABCDEXYZ'), a2d('x'))
    # print(ds.to_dot(*s))
    ds.resolve(*s)