pytest-dev / pytest-dev/pytest-mock

Warn when no specs are used

Open
#21 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2k
Forks
173
Avg merge
1d 10h
Merged PRs (30d)
6

Description

Mock without specs is so forgiving that people often write tests whose asserts do nothing

This is mainly because the apu of mock is severely flawed and error-prone

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies pytest-mock's mock behavior as the problem but names no files, tests, or entry points. Start by locating the mock implementation and its existing test coverage, then determine how a warning should identify unused specs. Done means the behavior is covered by tests and warns when no specs are used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.