def test_unique_list(): """removes duplicate entries in the list""" assert unique_list([]) == [] assert unique_list([1]) == [1] assert unique_list([1, 2]) == [1, 2] assert unique_list([1, 1]) == [1] assert unique_list([1, 1, 1]) == [1] assert unique_list([1, 1, 2]) == [1, 2] assert unique_list([1, 2, 1]) == [1, 2] assert unique_list([2, 1, 1]) == [2, 1]
def calls(self): """ Find the list of calls in each module. :return: a dictionary keyed by module name with a list of call symbols in the module as the values :rtype: dict(str,list(str)) """ calls = {} module_infos = self.find_modules(self.top_dir) for info in module_infos: calls[info.module_spec] = sorted(unique_list(info.calls)) return calls