Commit 4d2238d2 by Paul Sokolovsky

### tests: Fix more tests which depend on order of elements in set.

parent 3bb86632
 ... ... @@ -5,26 +5,26 @@ def r(s): sets = [set(), {1}, {1, 2}, {1, 2, 3}, {2, 3}, {2, 3, 5}, {5}, {7}] for s in sets: for t in sets: print(s, '|', t, '=', r(s | t)) print(s, '^', t, '=', r(s ^ t)) print(s, '&', t, '=', r(s & t)) print(s, '-', t, '=', r(s - t)) print(r(s), '|', r(t), '=', r(s | t)) print(r(s), '^', r(t), '=', r(s ^ t)) print(r(s), '&', r(t), '=', r(s & t)) print(r(s), '-', r(t), '=', r(s - t)) u = s.copy() u |= t print(s, "|=", t, '-->', r(u)) print(r(s), "|=", r(t), '-->', r(u)) u = s.copy() u ^= t print(s, "^=", t, '-->', r(u)) print(r(s), "^=", r(t), '-->', r(u)) u = s.copy() u &= t print(s, "&=", t, "-->", r(u)) print(r(s), "&=", r(t), "-->", r(u)) u = s.copy() u -= t print(s, "-=", t, "-->", r(u)) print(r(s), "-=", r(t), "-->", r(u)) print(s, '==', t, '=', s == t) print(s, '!=', t, '=', s != t) print(s, '>', t, '=', s > t) print(s, '>=', t, '=', s >= t) print(s, '<', t, '=', s < t) print(s, '<=', t, '=', s <= t) print(r(s), '==', r(t), '=', s == t) print(r(s), '!=', r(t), '=', s != t) print(r(s), '>', r(t), '=', s > t) print(r(s), '>=', r(t), '=', s >= t) print(r(s), '<', r(t), '=', s < t) print(r(s), '<=', r(t), '=', s <= t)
 print({1,2}.symmetric_difference({2,3})) print({1,2}.symmetric_difference([2,3])) print(sorted({1,2}.symmetric_difference({2,3}))) print(sorted({1,2}.symmetric_difference([2,3]))) s = {1,2} print(s.symmetric_difference_update({2,3})) l = list(s) ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!