So maybe we should discuss using it instead of the current homegrown
solution?
--
Ticket URL: <https://code.djangoproject.com/ticket/25707>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Someday/Maybe
* needs_tests: => 0
* needs_docs: => 0
Comment:
I've certainly had the same thought; in the abstract, I don't think it
makes much sense for us to be maintaining our own test runner atop
unittest when there are well-maintained existing runners with similar
features. But unless we are ready to tell the entire Django community they
must start using py.test, the change would need to only affect internal
testing. In that case we are still maintaining a custom test runner (for
users of Django), just no longer dogfooding it ourselves. That seems like
an unfortunate situation, and not much of a win. We have a lot of test
utilities which in a pytest world ought to be rewritten as pytest
fixtures, but then they are no longer available to non-pytest users.
So I can't really see how the change practically works until/unless we are
ready to just say "the blessed way of doing all Django testing is with
py.test." I'd be ok with that in theory - I think py.test is a very good
test runner, and it could be seen as another svn/git/hg situation, where
we should just make a choice (even if controversial) rather than muddling
along with the lowest common denominator. But it would be the second
recent big breaking change to testing (1.6 DiscoverRunner being the last);
I don't want to put the community through another change like that right
now, and I don't think the support is there in the core team to do it.
(It's a bigger change in a way than svn/git/hg, since that one didn't
affect non-contributor users at all).
So, reluctantly, I have to say that despite some possible benefits, I
don't think this is likely to happen anytime soon. Moving into the
Someday/maybe category.
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:1>
Comment (by auvipy):
better to be considered for 2.0+ series.
on that occasion unittest2pytest automated converted could be a help.
[official tool]
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:2>
Comment (by aaugustin):
We don't treat 2.0 as a special release, it's just the one that comes
after 1.10.
unittest2pytest is off-topic: the idea of this ticket isn't to change the
tests, it's to change the runner.
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:3>
* version: 1.8 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:4>
Comment (by Daniel Hahler):
For reference: I've started working on this a while ago, see
https://code.djangoproject.com/ticket/30415.
I was using a custom pytest plugin (that Django would ship itself), and
using a refactored runtests.py to re-use the same code Django uses
currently.[
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:5>
* cc: אורי (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:6>
* cc: Petr Přikryl (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:7>
* status: new => closed
* resolution: => wontfix
* stage: Someday/Maybe => Unreviewed
Comment:
Closing as `wontfix` after [https://groups.google.com/g/django-
developers/c/3LCCRh8HgwA discussion] on the mailing list.
--
Ticket URL: <https://code.djangoproject.com/ticket/25707#comment:8>