pytest-dev / pytest-dev/pytest-django
Early "python-paths" setting?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Description
I know about the pytest-python path plugin, but I'd like much earlier pythonpaths to be setup by pytest-django, so that it can find my early hook (which applies patches before django.setup()).
It looks like a simpler solution, for now, than making the "django.setup()" call configurable in pytest conf. In an early hook (before conftest.py files search and django;setup() loading), uers have all power to customize environment as they please, including replacing django.setup by something else..
Does it sound right that I attempt a PR on a setting like "python_paths_early = your/path/apps your/path/libs"? Or am I missing some aspects of the architecture?
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
No implementation files or tests are named. Start by tracing pytest-django's initialization and hook ordering around conftest.py discovery and django.setup(), then compare the pytest-python-path plugin behavior; done requires an agreed early-path setting with coverage proving paths are available before the early hook runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100