cirq.testing.EqualsTester.add_equality_group¶
-
EqualsTester.add_equality_group(*group_items)[source]¶ Tries to add a disjoint equivalence group to the equality tester.
This methods asserts that items within the group must all be equal toeach other, but not equal to any items in other groups that have beenor will be added.Parameters: *group_items – The items making up the equivalence group. Raises: AssertionError– Items within the group are not equal to each other, or items in another group are equal to items within the new group, or the items violate the equals-implies-same-hash rule.