1 """Various utility functions."""
4 return "%s.%s" % (cls
.__module
__, cls
.__name
__)
6 def sorted_list_difference(expected
, actual
):
7 """Finds elements in only one or the other of two, sorted input lists.
9 Returns a two-element tuple of lists. The first list contains those
10 elements in the "expected" list but not in the "actual" list, and the
11 second contains those elements in the "actual" list but not in the
12 "expected" list. Duplicate elements in either input list are ignored.
24 while expected
[i
] == e
:
34 while expected
[i
] == e
:
41 missing
.extend(expected
[i
:])
42 unexpected
.extend(actual
[j
:])
44 return missing
, unexpected