sagemath / sage

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

Random test failure in `src/sage/plot/plot.py` with exclude + detect_poles #39002

Closed user202729 closed 2 days ago

user202729 commented 3 days ago

Steps To Reproduce

See https://github.com/sagemath/sage/actions/runs/11905966286/job/33177274834?pr=39001 .

2024-11-19T04:26:04.0470352Z sage -t --warn-long 5.0 --random-seed=29237856840011735555139745604737857906 src/sage/plot/plot.py
2024-11-19T04:26:04.0471925Z **********************************************************************
2024-11-19T04:26:04.0591101Z File "src/sage/plot/plot.py", line 1857, in sage.plot.plot.plot
2024-11-19T04:26:04.0591946Z Failed example:
2024-11-19T04:26:04.0592761Z     plot(f, (x, -3.5, 3.5), detect_poles='show', exclude=[-3..3],
2024-11-19T04:26:04.0593588Z          ymin=-5, ymax=5)
2024-11-19T04:26:04.0594061Z Expected:
2024-11-19T04:26:04.0649808Z     Graphics object consisting of 12 graphics primitives
2024-11-19T04:26:04.0650471Z Got:
2024-11-19T04:26:04.1009273Z     Graphics object consisting of 13 graphics primitives
2024-11-19T04:26:26.6704957Z **********************************************************************

A pickled representation of the graphics object can be found here. Basically the problem appears to be somehow SageMath detect that there is a pole or something at 0 and draw a vertical dotted line there (which is the primitive g[6]).

tmp_nu_gwwb0

(reproduce with G = Graphics(); G.add_primitive(o[6]); G.axes(False); G)

DaveWitteMorris commented 2 days ago

This is a duplicate of #35470, #34772, and #33129.