def assert_event_matches(expected, actual, tolerate=None):
 differences = get_event_differences(expected, actual, tolerate=tolerate)
 if (len(differences) > 0):
  debug_info = ['', 'Expected:', block_indent(expected), 'Actual:', block_indent(actual), 'Tolerating:', block_indent(EventMatchTolerates.default_if_not_defined(tolerate))]
  differences = [('* ' + d) for d in differences]
  message_lines = (differences + debug_info)
  raise AssertionError(('Unexpected differences found in structs:\n\n' + '\n'.join(message_lines)))

def assert_event_matches ( expected , actual , tolerate = None ) : differences = get_event_differences ( expected , actual , tolerate = tolerate ) if ( len ( differences ) > 0 ) : debug_info = [ '' , 'Expected:' , block_indent ( expected ) , 'Actual:' , block_indent ( actual ) , 'Tolerating:' , block_indent ( EventMatchTolerates . default_if_not_defined ( tolerate ) ) ] differences = [ ( '* ' + d ) for d in differences ] message_lines = ( differences + debug_info ) raise AssertionError ( ( 'Unexpected differences found in structs:\n\n' + '\n' . join ( message_lines ) ) )
compare two event dictionaries .