pytest-dev / pytest-dev/pytest-bdd
scenarios should give a user friendly message
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 251
- Avg merge
- 43m
- Merged PRs (30d)
- 2
Description
Seems like the api is unexpected:
scenario(filename, name)
scenarios(folder)
So one would expect following to give a better error:
scenarios('foo.feature')
*** AttributeError: 'NoneType' object has no attribute '__file__'
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 by reproducing the scenarios('foo.feature') call shown in the issue and trace where the AttributeError is produced. The work is done when this invalid input reports a user-friendly error instead of the NoneType file traceback; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100