Commit
2 years ago
gh-35513: Silence initialization of giac When sage.libs.giac.giac is imported for the first time, some noise is output to stderr. This is annoying and complicates doctesting as `...` has to be added to the _first_ time giac is used. This output comes from the line Pygen('add_language(1)').eval() # Add the french keywords in the giac library language. which doesn't seem to be necessary. This commit removes the line, and fixes a few doctests which where expecting some output when using libgiac for the first time. Also label `# long time` a doctest in `src/sage/calculus/functional.py` which takes 6-7 seconds. Doing this in the first place motivates the current change as the initialization noise would happen in different tests depending on whether `--long` or not is used. Same for a doctest in `src/sage/calculus/tests.py`, and one in `src/sage/symbolic/integration/integral.py`. A test in `src/sage/libs/giac/giac.pyx` was marked `# random` but after this fix it seems to work ok. ### :memo: Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] There are existing tests covering the changes. URL: https://github.com/sagemath/sage/pull/35513 Reported by: Gonzalo Tornaría Reviewer(s): François Bissey
Author
Release Manager
Loading