Module: cirq.testing.order_tester

A utility class for testing ordering methods.

To test an ordering method, create an OrderTester and add several equivalence groups or items to it. The order tester will check that the items within each group are all equal to each other, and every new added item or group is strictly ascending with regard to the previously added items or groups.

It will also check that ab implies hash(a)hash(b).


class OrderTester: Tests ordering against user-provided disjoint ordered groups or items.