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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)