MCPcopy Create free account
hub / github.com/pybind/pybind11 / Unordered

Class Unordered

tests/conftest.py:97–108  ·  view source on GitHub ↗

Custom comparison for output without strict line ordering

Source from the content-addressed store, hash-verified

95
96
97class Unordered(Output):
98 """Custom comparison for output without strict line ordering"""
99
100 __hash__ = None
101
102 def __eq__(self, other):
103 a = _split_and_sort(self.string)
104 b = _split_and_sort(other)
105 if a == b:
106 return True
107 self.explanation = _make_explanation(a, b)
108 return False
109
110
111class Capture:

Callers 1

unorderedMethod · 0.85

Calls

no outgoing calls

Tested by 1

unorderedMethod · 0.68