Fixtures should only have data in them directly pertinent to testing.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Testing fixtures should only contain data related to the test they are used in. That means if you have a test and fixture set that do not examine header information, you shouldn't have header information in the fixtures.
This also means that if you are not examining the request XML documents then, why include that data in the fixture? Take it out.
This is naturally lower priority than getting some kind of testing around an API call if there is no testing at all around some method. But, as a matter of improving practice and improving testing this should be an exercise in increasing the effectiveness of the tests as well as reducing the amount of information in the test system to its minimum.
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 no specific files, fixtures, or tests; start by locating the repository's fixture sets and the tests that consume them. For each fixture, identify data not asserted or used by its tests, then remove only that unrelated data and verify the affected test suite still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100