sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.47k stars 485 forks source link

Random test failure in `simplicial_sets` #38888

Open tobiasdiez opened 3 weeks ago

tobiasdiez commented 3 weeks ago

Steps To Reproduce

No response

Expected Behavior

Tests pass

Actual Behavior

sage -t --warn-long 5.0 --random-seed=52078804102925852962925524043712901488 src/sage/categories/simplicial_sets.py
**********************************************************************
File "src/sage/categories/simplicial_sets.py", line 538, in sage.categories.simplicial_sets.SimplicialSets.Pointed.ParentMethods.cover
Failed example:
    C.face_data()
Expected:
    {(*, ()): None,
     (*, (1,2,3)): None,
     (*, (1,3,2)): None,
     (sigma_1, ()): ((*, (1,2,3)), (*, ())),
     (sigma_1, ()): ((*, (1,3,2)), (*, ())),
     (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))),
     (sigma_1, (1,2,3)): ((*, ()), (*, (1,2,3))),
     (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))),
     (sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2)))}
Got:
    {(*, ()): None,
     (*, (1,2,3)): None,
     (*, (1,3,2)): None,
     (sigma_1, ()): ((*, (1,3,2)), (*, ())),
     (sigma_1, ()): ((*, (1,2,3)), (*, ())),
     (sigma_1, (1,2,3)): ((*, ()), (*, (1,2,3))),
     (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))),
     (sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2))),
     (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2)))}

Additional Information

No response

Environment

Linux: https://github.com/sagemath/sage/actions/runs/11589629492/job/32265510963

Checklist

miguelmarco commented 3 weeks ago

It seems to be the same dictionary, but presented in different order. Maybe some change in the python version?

tobiasdiez commented 3 weeks ago

It happens across multiple python versions.

dcoudert commented 2 weeks ago

May be we should use something like that to make the test more robust ?

sage: res = C.domain().face_data()
sage: type(res)
<class 'dict'>
sage: sorted(res.items())
[((*, ()), None),
 ((*, (1,2,3)), None),
 ((*, (1,3,2)), None),
 ((sigma_1, ()), ((*, (1,2,3)), (*, ()))),
 ((sigma_1, ()), ((*, ()), (*, ()))),
 ((sigma_1, (1,2,3)), ((*, (1,3,2)), (*, (1,2,3)))),
 ((sigma_1, (1,2,3)), ((*, (1,2,3)), (*, (1,2,3)))),
 ((sigma_1, (1,3,2)), ((*, ()), (*, (1,3,2)))),
 ((sigma_1, (1,3,2)), ((*, (1,3,2)), (*, (1,3,2))))]

or

sage: {k: res[k] for k in sorted(res)}
{(*, ()): None,
 (*, (1,2,3)): None,
 (*, (1,3,2)): None,
 (sigma_1, ()): ((*, (1,2,3)), (*, ())),
 (sigma_1, ()): ((*, ()), (*, ())),
 (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))),
 (sigma_1, (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))),
 (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))),
 (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2)))}