On 17/05/2016 02:32, Josh Smeaton wrote:
I have the same problem when running tests in Django's test suite. When
there's a failure, I have to copy the test path, paste that, then copy
the failing test.
Now that you mention it, another improvement could be to compose a
ready-to-copy-and-paste "url" for the output of failing tests. Instead of:
====================
ERROR: test_method_1 (mydjangoapp.app_one.tests.test_module.TestClass)
Test docstring
====================
we could tweak printErrorList() into something along the line of:
====================
ERROR: test_method_1 (mydjangoapp.app_one.tests.test_module.TestClass)
Test docstring
url: mydjangoapp.app_one.tests.test_module.TestClass.test_method_1
====================
Would you mind posting your patch somewhere? Reviewing code along with
the description and seeing potential for changes would be cool.
Sure, no problem.
http://paste.debian.net/686941/
It's somehow rough, I'm simply adding a new optional parameter to the
Django Command that runs the tests; this parameter will force an
iteration through the test suite and discard those methods whose name is
not specified. I could not directly access the TestSuite objects to
remove an item (which is funny since internally unittest.TestSuite uses
a list).
It could be refactored somewhere else or improved like you suggested,
provided some examples of what kind of globbing/regex you think it would
be useful f.e. glob test methods only? Packages only? A dot separated
syntax to specify both? Etc.
Concerning the suggestion of Ludovic of gathering the failing tests and
re-run them, I agree that a dedicated tool like the juno-testrunner is
better suited for the job.
Thanks for your comments.
Antonio
--
You received this message because you are subscribed to the Google Groups "Django
developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/573B7196.6050902%40storiepvtride.it.
For more options, visit https://groups.google.com/d/optout.