pytest-dev / pytest-dev/pytest
scoped tmp_path_factory fixtures
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
I think that there should be tmp_path_factorys and other similar fixtures with different scopes. I initially started working on this as a PR for pytest-datadir but the implementation of the scoped factories should really be upstream here. The implementation is simple:
https://github.com/gabrielcnr/pytest-datadir/pull/27/files#diff-fb0ca03425023403a38456a8f44597bfR99
The question is whether this is the way to provide them, i.e. the pattern <scope>_<fixture_name> e.g. class_tmp_path_factory.
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 with the implementation linked from pytest-datadir PR #27, especially the referenced diff, then review pytest's existing tmp_path_factory fixture API and scope conventions. Done means pytest provides equivalent fixtures for the required scopes with an agreed naming pattern such as _<fixture_name>.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100