pytest-dev / pytest-dev/pytest-django
django_find_project: inconsistent behavior with args
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Description
The django_find_project option will not check for a Django project (manage.py) if run via pytest -k foo, since it will only look for manage.py from "foo".
The main issue here is: foo is not a file, but the value for the -k option, it should behave as with just pytest here. This requires to actually look at parsed args/options and not the raw args.
As a workaround we should add cwd always for the check (last), as with just using pytest.
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 tracing the django_find_project option handling and compare parsed options with the raw arguments. Reproduce the behavior with pytest -k foo and plain pytest; done means both checks find manage.py consistently, including the cwd fallback described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100