def test_compare_paths(): lesser = ('a_dict', 'keysrules') greater = ('a_dict', 'valuesrules') assert compare_paths_lt(lesser, greater) lesser += ('type', ) greater += ('regex', ) assert compare_paths_lt(lesser, greater)
def __lt__(self, other): if self.document_path != other.document_path: return compare_paths_lt(self.document_path, other.document_path) else: return compare_paths_lt(self.schema_path, other.schema_path)
def __lt__(self, other): if self.document_path != other.document_path: return compare_paths_lt(self.document_path, other.document_path) else: return compare_paths_lt(self.schema_path, other.schema_path)