#23768: Rewrite template_tag.tests.TemplateTests as individual test cases
--------------------------------------+------------------------------------
Reporter: prestontimmons | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by prestontimmons):
I've added a proof-of-concept for this here:
https://github.com/prestontimmons/django/compare/ticket-23768
This is a rewrite of most of the "basic-syntax-*" tests into a
BasicSyntaxTests class.
It maintains the current behavior of the test runner, which runs each test
6 times with combinations of TEMPLATE_DEBUG, TEMPLATE_STRING_IF_INVALID,
and the cached loader, with the following advantages:
* Individual tests can be run easily, like `./runtests.py
--settings=test_sqlite
template_tests.test_clean.BasicSyntaxTests.test_text`.
* The --failfast option works correctly. `./runtests.py
--settings=test_sqlite template_tests.test_clean.BasicSyntaxTests
--failfast`.
* Readability is improved.
Is this approach acceptable? Porting existings tests over to it is easy.
--
Ticket URL: <https://code.djangoproject.com/ticket/23768#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.3de4e9df462bc737d08f3a41080b11ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.