pytest-dev / pytest-dev/pytest-django
manage.py replacement PyTestRunner from docs is broken
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Description
The docs (https://github.com/pytest-dev/pytest-django/blob/master/docs/faq.rst#how-can-i-use-managepy-test-with-pytest-django) include a description for how to hook up manage.py to use pytest.
The provided code doesn't work with Django 1.9 for a couple of reasons --
First, run_test has the following signature:
def run_tests(self, test_labels, extra_tests, **kwargs):
(https://github.com/django/django/blob/master/tests/test_runner/runner.py#L19)
And secondly, this command is valid: ./manage.py app1.package.module:TestClass.test_method
But the PyTesetRunner doesn't have any way to unpack module path from the class part.
Thoughts on how best to proceed?
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 with docs/faq.rst and the documented PyTestRunner example, then compare it with Django 1.9's test-runner signature and the module-path command described in the issue. Done means the manage.py integration documented there works with Django 1.9, including the cited module, class, and method form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- documentation, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100