request to reopen issue #23332 (using the dotted test name in test output)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

request to reopen issue #23332 (using the dotted test name in test output)

Chris Jerdonek-3
Hi, I would like to reopen the following issue from two years ago to change the test name in Django's test output from unittest's default to the full "dotted name":

https://code.djangoproject.com/ticket/23332

This would make rerunning failing tests easier because then the test name could simply be copy and pasted from the command-line as is.

Tim told me that to reopen the issue, it needed to be discussed on this list first and consensus reached. See Tim's comment (as well as some of my reasoning for why I think the issue should be reopened) here:

https://code.djangoproject.com/ticket/27255

I put together a patch here with tests so you can see the PR that I was planning to propose:

https://github.com/cjerdonek/django/commits/dotted-name-test-output

The approach is simply to subclass unittest.TextTestResult and override its getDescription() method to use the dotted name instead of unittest's current, less helpful format. Django already has an example of subclassing TextTestResult with its DebugSQLTextTestResult class.

Thanks,
--Chris

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/5ab3f23b-04c0-455e-8f33-7502e14f9fe9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: request to reopen issue #23332 (using the dotted test name in test output)

Yoong Kang Lim
Hmm if we're going down that path, I'd prefer to be more explicit about it. How about including the exact command that people can copy to re-run the failed test?

This is what the RSpec library (a Ruby testing library) does, and IMO it really gets it right. 

See this blog post here from a Ruby core member for some comments (under "things I like about RSpec", and yes, that's the actual domain name): 


Thoughts?



On Wed, Sep 21, 2016 at 4:56 AM, Chris Jerdonek <[hidden email]> wrote:
Hi, I would like to reopen the following issue from two years ago to change the test name in Django's test output from unittest's default to the full "dotted name":


This would make rerunning failing tests easier because then the test name could simply be copy and pasted from the command-line as is.

Tim told me that to reopen the issue, it needed to be discussed on this list first and consensus reached. See Tim's comment (as well as some of my reasoning for why I think the issue should be reopened) here:


I put together a patch here with tests so you can see the PR that I was planning to propose:


The approach is simply to subclass unittest.TextTestResult and override its getDescription() method to use the dotted name instead of unittest's current, less helpful format. Django already has an example of subclassing TextTestResult with its DebugSQLTextTestResult class.

Thanks,
--Chris

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/5ab3f23b-04c0-455e-8f33-7502e14f9fe9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAKL8yL6jNfkY6X3vwJxxAKJmnjKzi8H_qSpfH9i0sE350L4q5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: request to reopen issue #23332 (using the dotted test name in test output)

Tim Graham-2
In reply to this post by Chris Jerdonek-3
I updated the Python issue to ask whether or not there's consensus to make the change there. Even if that issue proceeds, I guess it would be a nice convenience for current versions of Python that won't receive the change.
http://bugs.python.org/issue22431

On Tuesday, September 20, 2016 at 8:16:27 PM UTC-4, Chris Jerdonek wrote:
Hi, I would like to reopen the following issue from two years ago to change the test name in Django's test output from unittest's default to the full "dotted name":

<a href="https://code.djangoproject.com/ticket/23332" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F23332\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFBCZhd4kwXR0vMk6lWvcZzG4ebCA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F23332\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFBCZhd4kwXR0vMk6lWvcZzG4ebCA&#39;;return true;">https://code.djangoproject.com/ticket/23332

This would make rerunning failing tests easier because then the test name could simply be copy and pasted from the command-line as is.

Tim told me that to reopen the issue, it needed to be discussed on this list first and consensus reached. See Tim's comment (as well as some of my reasoning for why I think the issue should be reopened) here:

<a href="https://code.djangoproject.com/ticket/27255" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F27255\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHRi0Qka0YeR_W-y4n6d0CVnntnSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F27255\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHRi0Qka0YeR_W-y4n6d0CVnntnSg&#39;;return true;">https://code.djangoproject.com/ticket/27255

I put together a patch here with tests so you can see the PR that I was planning to propose:

<a href="https://github.com/cjerdonek/django/commits/dotted-name-test-output" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcjerdonek%2Fdjango%2Fcommits%2Fdotted-name-test-output\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHXfBsP1-yzc2lbI58iG9CwxzXUHQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcjerdonek%2Fdjango%2Fcommits%2Fdotted-name-test-output\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHXfBsP1-yzc2lbI58iG9CwxzXUHQ&#39;;return true;">https://github.com/cjerdonek/django/commits/dotted-name-test-output

The approach is simply to subclass unittest.TextTestResult and override its getDescription() method to use the dotted name instead of unittest's current, less helpful format. Django already has an example of subclassing TextTestResult with its DebugSQLTextTestResult class.

Thanks,
--Chris

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/b768f210-97a5-4f4d-b339-c54a5e77960e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: request to reopen issue #23332 (using the dotted test name in test output)

Chris Jerdonek-3
On Tuesday, September 20, 2016 at 5:28:46 PM UTC-7, Tim Graham wrote:
I updated the Python issue to ask whether or not there's consensus to make the change there. Even if that issue proceeds, I guess it would be a nice convenience for current versions of Python that won't receive the change.
<a href="http://bugs.python.org/issue22431" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbugs.python.org%2Fissue22431\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNERgHty5z-SJf1_h02B3bG8lEP8Wg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbugs.python.org%2Fissue22431\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNERgHty5z-SJf1_h02B3bG8lEP8Wg&#39;;return true;">http://bugs.python.org/issue22431

Thanks for getting clarification on the Python issue, Tim.

To expand on Tim's latter point, because changing this in Python wouldn't be considered a bug fix in Python, the earliest Python version that could have the change would be 3.7. If the time between 3.6 and 3.7 is the same as the expected time between 3.5 and 3.6 (see [1] and [2] for those schedules), then 3.7 would be released in March 2018. Django users using Python 2.x or 3.6 or lower would never see the change if it's changed in Python alone.

--Chris

[1]: https://www.python.org/dev/peps/pep-0478/
[2]: https://www.python.org/dev/peps/pep-0494/

 
On Tuesday, September 20, 2016 at 8:16:27 PM UTC-4, Chris Jerdonek wrote:
Hi, I would like to reopen the following issue from two years ago to change the test name in Django's test output from unittest's default to the full "dotted name":

<a href="https://code.djangoproject.com/ticket/23332" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F23332\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFBCZhd4kwXR0vMk6lWvcZzG4ebCA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F23332\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFBCZhd4kwXR0vMk6lWvcZzG4ebCA&#39;;return true;">https://code.djangoproject.com/ticket/23332

This would make rerunning failing tests easier because then the test name could simply be copy and pasted from the command-line as is.

Tim told me that to reopen the issue, it needed to be discussed on this list first and consensus reached. See Tim's comment (as well as some of my reasoning for why I think the issue should be reopened) here:

<a href="https://code.djangoproject.com/ticket/27255" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F27255\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHRi0Qka0YeR_W-y4n6d0CVnntnSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F27255\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHRi0Qka0YeR_W-y4n6d0CVnntnSg&#39;;return true;">https://code.djangoproject.com/ticket/27255

I put together a patch here with tests so you can see the PR that I was planning to propose:

<a href="https://github.com/cjerdonek/django/commits/dotted-name-test-output" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcjerdonek%2Fdjango%2Fcommits%2Fdotted-name-test-output\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHXfBsP1-yzc2lbI58iG9CwxzXUHQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcjerdonek%2Fdjango%2Fcommits%2Fdotted-name-test-output\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHXfBsP1-yzc2lbI58iG9CwxzXUHQ&#39;;return true;">https://github.com/cjerdonek/django/commits/dotted-name-test-output

The approach is simply to subclass unittest.TextTestResult and override its getDescription() method to use the dotted name instead of unittest's current, less helpful format. Django already has an example of subclassing TextTestResult with its DebugSQLTextTestResult class.

Thanks,
--Chris

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/77cfcd16-601a-461a-bc6f-dcae97c03caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: request to reopen issue #23332 (using the dotted test name in test output)

Josh Smeaton
I'd be very happy with a change to give the full dotted path to the test. I've copy/paste/modify/copy/paste hundreds of times, and it has always bothered me. Big +1. Agree with Tim that a push upstream would be good, but I'm all for solving this immediately in Django.

I think the suggestion made by Yoong Kang Lim is probably a marginal improvement over full dotted path, and don't have any strong feelings here other than if you try and it gets really complicated then stop.

Cheers


On Wednesday, 21 September 2016 19:24:54 UTC+10, Chris Jerdonek wrote:
On Tuesday, September 20, 2016 at 5:28:46 PM UTC-7, Tim Graham wrote:
I updated the Python issue to ask whether or not there's consensus to make the change there. Even if that issue proceeds, I guess it would be a nice convenience for current versions of Python that won't receive the change.
<a href="http://bugs.python.org/issue22431" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbugs.python.org%2Fissue22431\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNERgHty5z-SJf1_h02B3bG8lEP8Wg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbugs.python.org%2Fissue22431\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNERgHty5z-SJf1_h02B3bG8lEP8Wg&#39;;return true;">http://bugs.python.org/issue22431

Thanks for getting clarification on the Python issue, Tim.

To expand on Tim's latter point, because changing this in Python wouldn't be considered a bug fix in Python, the earliest Python version that could have the change would be 3.7. If the time between 3.6 and 3.7 is the same as the expected time between 3.5 and 3.6 (see [1] and [2] for those schedules), then 3.7 would be released in March 2018. Django users using Python 2.x or 3.6 or lower would never see the change if it's changed in Python alone.

--Chris

[1]: <a href="https://www.python.org/dev/peps/pep-0478/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0478%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVyZYpZxddRXPY1GYdGLeycRylGQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0478%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVyZYpZxddRXPY1GYdGLeycRylGQ&#39;;return true;">https://www.python.org/dev/peps/pep-0478/
[2]: <a href="https://www.python.org/dev/peps/pep-0494/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0494%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF2onIsVzeFQVU6EG3OlEkRerduUg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0494%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF2onIsVzeFQVU6EG3OlEkRerduUg&#39;;return true;">https://www.python.org/dev/peps/pep-0494/

 
On Tuesday, September 20, 2016 at 8:16:27 PM UTC-4, Chris Jerdonek wrote:
Hi, I would like to reopen the following issue from two years ago to change the test name in Django's test output from unittest's default to the full "dotted name":

<a href="https://code.djangoproject.com/ticket/23332" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F23332\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFBCZhd4kwXR0vMk6lWvcZzG4ebCA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F23332\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFBCZhd4kwXR0vMk6lWvcZzG4ebCA&#39;;return true;">https://code.djangoproject.com/ticket/23332

This would make rerunning failing tests easier because then the test name could simply be copy and pasted from the command-line as is.

Tim told me that to reopen the issue, it needed to be discussed on this list first and consensus reached. See Tim's comment (as well as some of my reasoning for why I think the issue should be reopened) here:

<a href="https://code.djangoproject.com/ticket/27255" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F27255\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHRi0Qka0YeR_W-y4n6d0CVnntnSg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F27255\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHRi0Qka0YeR_W-y4n6d0CVnntnSg&#39;;return true;">https://code.djangoproject.com/ticket/27255

I put together a patch here with tests so you can see the PR that I was planning to propose:

<a href="https://github.com/cjerdonek/django/commits/dotted-name-test-output" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcjerdonek%2Fdjango%2Fcommits%2Fdotted-name-test-output\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHXfBsP1-yzc2lbI58iG9CwxzXUHQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fcjerdonek%2Fdjango%2Fcommits%2Fdotted-name-test-output\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHXfBsP1-yzc2lbI58iG9CwxzXUHQ&#39;;return true;">https://github.com/cjerdonek/django/commits/dotted-name-test-output

The approach is simply to subclass unittest.TextTestResult and override its getDescription() method to use the dotted name instead of unittest's current, less helpful format. Django already has an example of subclassing TextTestResult with its DebugSQLTextTestResult class.

Thanks,
--Chris

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/5b392b5f-b1e0-4b8a-bb11-3e2019fe0a2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.