def test_common_action_prefix():
    this = [ActionExecuted('action_listen'), ActionExecuted('greet'), UserUttered('hey'), ActionExecuted('amazing'), SlotSet('my_slot', 'a'), ActionExecuted('a'), ActionExecuted('after_a')]
    other = [ActionExecuted('action_listen'), ActionExecuted('greet'), UserUttered('hey'), ActionExecuted('amazing'), SlotSet('my_slot', 'b'), ActionExecuted('b'), ActionExecuted('after_b')]
    num_common = visualization._length_of_common_action_prefix(this, other)
    assert (num_common == 3)
def test_common_action_prefix():
    this = [ActionExecuted('action_listen'), ActionExecuted('greet'), UserUttered('hey'), ActionExecuted('amazing'), SlotSet('my_slot', 'a'), ActionExecuted('a'), ActionExecuted('after_a')]
    other = [ActionExecuted('action_listen'), ActionExecuted('greet'), UserUttered('hey'), ActionExecuted('amazing'), SlotSet('my_slot', 'b'), ActionExecuted('b'), ActionExecuted('after_b')]
    num_common = visualization._length_of_common_action_prefix(this, other)
    assert (num_common == 3)