Skip to content

support custom test runners #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matthewleon opened this issue Oct 31, 2014 · 2 comments
Closed

support custom test runners #185

matthewleon opened this issue Oct 31, 2014 · 2 comments

Comments

@matthewleon
Copy link

Currently, pytest runs the setup_databases methods from Django's DiscoverRunner to set up the database. It should support setup_databases from custom test runners as defined in the TEST_RUNNER setting.

@matthewleon matthewleon changed the title support custom test runners for Django unittest tests support custom test runners Oct 31, 2014
@javrasya
Copy link

javrasya commented Jan 8, 2015

+1 for me.

@pelme
Copy link
Member

pelme commented Jan 9, 2015

pytest-django does not use Django's DiscoverRunner for running the tests - pytest is the test runner and that is the entire purpose of pytest-django.

In fact, DiscoverRunner is not even used by pytest-django in Django 1.6+ if you look carefully in https://github.com/pytest-dev/pytest-django/blob/master/pytest_django/compat.py

However, the problem of not being able to swap setup_databases to something different remains, but this will be solved with pytest fixtures. See #37 (comment) for an example on this. When such fixtures can be defined, it will be trivial to the appropriate methods from another test runner class.

Closing this issue since custom test runners cannot be supported in this way.

@pelme pelme closed this as completed Jan 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants