pytest-dev / pytest-dev/pytest
[Doctest] Doctest inspect unwrap passing func to _stop instead of obj
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
Can someone reason why func is passed to _stop and not obj, this was changed in this commit https://github.com/pytest-dev/pytest/commit/32dd0e87cb2e6750c1fc2356eb451c9811bdb065.
This seems to be breaking cases where stop requires details of inner wrappers of the function, as only the intial function is used for stop evaluation
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
Start at src/_pytest/doctest.py line 477 and compare the func argument passed to _stop with obj, using commit 32dd0e87cb2e6750c1fc2356eb451c9811bdb065 as context. Reproduce a doctest case with wrapped functions that needs inner-wrapper details, then determine whether the behavior is incorrect and verify that stop evaluation receives the required object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100