def assert_config_change_dict(actual_result, expected_result):
 change_diffs = {}
 for (file_path, actual_changes) in actual_result.items():
  expected_changes = expected_result[file_path]
  actual_adds = actual_changes[0]
  actual_removes = actual_changes[1]
  expected_adds = expected_changes[0]
  expected_removes = expected_changes[1]
  unexpected_adds = sorted((set(actual_adds) - set(expected_adds)))
  not_present_adds = sorted((set(expected_adds) - set(actual_adds)))
  unexpected_removes = sorted((set(actual_removes) - set(expected_removes)))
  not_present_removes = sorted((set(expected_removes) - set(actual_removes)))
  change_diffs[file_path] = (unexpected_adds, not_present_adds, unexpected_removes, not_present_removes)
 return change_diffs

def assert_config_change_dict ( actual_result , expected_result ) : change_diffs = { } for ( file_path , actual_changes ) in actual_result . items ( ) : expected_changes = expected_result [ file_path ] actual_adds = actual_changes [ 0 ] actual_removes = actual_changes [ 1 ] expected_adds = expected_changes [ 0 ] expected_removes = expected_changes [ 1 ] unexpected_adds = sorted ( ( set ( actual_adds ) - set ( expected_adds ) ) ) not_present_adds = sorted ( ( set ( expected_adds ) - set ( actual_adds ) ) ) unexpected_removes = sorted ( ( set ( actual_removes ) - set ( expected_removes ) ) ) not_present_removes = sorted ( ( set ( expected_removes ) - set ( actual_removes ) ) ) change_diffs [ file_path ] = ( unexpected_adds , not_present_adds , unexpected_removes , not_present_removes ) return change_diffs
calculates unexpected line changes .