pytest-dev / pytest-dev/pytest-bdd

No warning for duplicate Scenarios

Open
#191 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
251
Avg merge
43m
Merged PRs (30d)
2

Description

If you create two valid scenarios with the same name, even with different steps, pytest will run the tests successfully with no warning or error. The only way to detect this is to count or list the tests and manually check that none is missing.

I'm guessing a warning would be best approach.

Are there any gotcha situations where allowing duplicates would actually be the best use case?

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 names no file, test, or entry point. Start by tracing how pytest-bdd registers Scenario names and how collected tests are reported; then decide whether duplicate names should warn or error, including the case with different steps, and add coverage for the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.