Skip to content

Conversation

user202729
Copy link
Contributor

@user202729 user202729 commented Aug 30, 2025

If you look at the log on the CI, without this change, it would print out some stuff on stderr.

============================= test session starts ==============================
platform linux -- Python 3.12.11, pytest-8.4.1, pluggy-1.6.0
rootdir: /home/runner/work/sage/sage
configfile: pyproject.toml
plugins: xdist-3.8.0
collected 76 items / 2 skipped

src/sage/cli/eval_cmd_test.py ..
usage: pytest [-h] [-n [{jupyter,jupyterlab}]]
pytest: error: argument -n/--notebook: invalid choice: 'invalid' (choose from jupyter, jupyterlab)
src/sage/cli/notebook_cmd_test.py .....
src/sage/doctest/parsing_test.py ...........

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Aug 30, 2025

Documentation preview for this PR (built with commit c94d477; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729 user202729 force-pushed the fix-notebook-cmd-test branch from 8f21e32 to a85f9b8 Compare August 30, 2025 12:21
@tobiasdiez
Copy link
Contributor

Thanks, but using capsys is a bit cleaner/stable and also allows to verify that the correct error is written to stderr.

@user202729 user202729 force-pushed the fix-notebook-cmd-test branch from a85f9b8 to c94d477 Compare August 30, 2025 13:59
Copy link
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vbraun vbraun merged commit 79623d0 into sagemath:develop Sep 7, 2025
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants