You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only advantage is that it's a bit more integrated with Django, e.g. the command line parsing. But if what you did works for you, I don't see much problem with it!
if anyone ever tried to debug this / add any arguments, this will get chaotic quick.
Personally, I use the pytest args --last-failed / -x / -s / -vv / --pdb daily. Not being able to specify them at will, because you dont want them on all the time, makes this solution very poor.
And --pdbcls=IPython.terminal.debugger:TerminalPdb is on by default inside pyproject.toml. Example
But like @bluetech, said, if this solution works for you, 👍
@bluetech Why isn't PytestTestRunner included in the library to lower the entry level? It would be much faster to add TEST_RUNNER = 'pytest_django.runner.PytestTestRunner' than it is to copy it somewhere into your own repo and maintain it -- if you need more customizing just override it with your own while inheriting from one provided by pytest_django -- no?
Docs suggest to define custom test runner to invoke
pytest
(thus, relatedpytest-django
functionality) via themanage.py
script.I used the following snippet and everything works as expected:
What are the advantages of the solution presented in the docs compared to the one above? Thanks in advance for any feedback.
The text was updated successfully, but these errors were encountered: