pytest-dev / pytest-dev/pytest
A commandline flag to override `pytrace` in failure
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
I use pytest to automatically check my students' exercises.
They receive the output from pytest.fail, and I don't want them seeing the entire stack trace, including local paths, potential edge cases they're supposed to find themselves, et cetera.
Currently, all my tests use pytest.fail(..., pytrace=False), but this is far from ideal, as I have many assistants writing tests and not all of them are familiar with this necessity.
I made a fork that adds the --no-trace flag, opening the issue to submit a pull request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names pytest.fail and the proposed --no-trace command-line flag, but no files or tests. Start by tracing how pytest.fail handles pytrace and how command-line options are registered; done means the flag consistently suppresses the failure stack trace without requiring pytrace=False in individual tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100