Skip to content

Commit 449a1ea

Browse files
authored
approx_eq - ensure set-sorting of the first argument is tested (#7830)
Problem: Internal mutants test showed that tests pass if the first set-like argument to approx_eq is not sorted. That is because the first argument in test cases happens to have sorted order. Solution: Also test with the first argument of unsorted order. Related to #6376 and #7792
1 parent 9b89f3c commit 449a1ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cirq-core/cirq/protocols/approximate_equality_protocol_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ def test_approx_eq_set() -> None:
176176

177177
# here sij, sji are equal, but have a different order
178178
assert cirq.approx_eq(sij, sji)
179+
assert cirq.approx_eq(sji, sij)
179180
assert cirq.approx_eq(sij, frozenset(sji))
180181
assert cirq.approx_eq(frozenset(sij), frozenset(sji))
181182

0 commit comments

Comments
 (0)