Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/interpreter/test/apptest_compiler.py::test_dict_and_set_literal_order

def test_dict_and_set_literal_order():
        x = 1
        l1 = list({1:'a', 3:'b', 2:'c', 4:'d'})
        l2 = list({1, 3, 2, 4})
        l3 = list({x:'a', 3:'b', 2:'c', 4:'d'})
        l4 = list({x, 3, 2, 4})
        if not IS_PYPY:
            # the full test relies on the host Python providing ordered dicts
            assert set(l1) == set(l2) == set(l3) == set(l4) == {1, 3, 2, 4}
        else:
>           assert l1 == l2 == l3 == l4 == [1, 3, 2, 4]
E           (application-level) AssertionError: assert [1, 2, 3, 4] == [1, 3, 2, 4]

interpreter/test/apptest_compiler.py:228: AssertionError
builder: own-linux-x86-32 build #9524+
test: pypy/interpreter/test/apptest_compiler.py::test_dict_and_set_literal_order