Run pytest for src tree if no filename is given#35999
Run pytest for src tree if no filename is given#35999vbraun merged 6 commits intosagemath:developfrom
Conversation
|
|
|
Adding |
Explicitly limiting tests to |
mkoeppe
left a comment
There was a problem hiding this comment.
Otherwise LGTM.
Tobias's suggestion to have pytest ignore local (and I think also venv) is a good idea too, but it's already a good fix as is.
|
Thanks! |
|
Documentation preview for this PR (built with commit e17f1de; changes) is ready! 🎉 |
sagemathgh-41702: remove many deprecated functions in rings after sagemath#38290 ; Closed Date: 2024-08-03 sagemath#38128 ; Closed Date: 2024-06-22 sagemath#35999 ; Closed Date: 2023-08-05 sagemath#38266 ; Closed Date: 2024-08-03 ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. URL: sagemath#41702 Reported by: Frédéric Chapoton Reviewer(s):
This fixes the failure seen, for example,
https://github.com/sagemath/sage/actions/runs/5678761729/job/15389749593?pr=35991
Note that the last failure message
This is not a fault of matplotlib! The fault lies on our pytest, which blindly runs all tests found in the directory tree under the root dir. (matplotlib test files are supposed to run in a development install, where the baseline image directory exists, but our install (SPKG) of matplotlib is not a development install, and hence there's no baseline image directory.)
So we need to stop pytest from running blind. The failure in the incremental test workflow results from an error in
sage-runtests. The relevant lines areLook at the faulty line. The condition test allows pytest run without explicit filenames. This results in running pytest for all test files found under the (sage) root dir. Hence pytest attempts to run tests in matplotlib in
local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/matplotlib/tests.The branch of this PR fixes the problem.
📝 Checklist
⌛ Dependencies