[Django] #29658: Use unittest.addCleanup to unregister lookups.

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

[Django] #29658: Use unittest.addCleanup to unregister lookups.

Django
#29658: Use unittest.addCleanup to unregister lookups.
------------------------------------------------+------------------------
               Reporter:  Mads Jensen           |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Core (Other)          |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  1
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 There are some places in the test suite that follow this pattern:

 {{{
 try:
    CharField.register_lookup(Length)
    # some test code
 finally:
    CharField._unregister_lookup(Length)
 }}}

 It'd be better to use `unittest.addCleanup` to handle this stuff.

--
Ticket URL: <https://code.djangoproject.com/ticket/29658>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.9be36496ddb2273263fbed07ed805159%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29658: Use unittest.addCleanup to unregister lookups.

Django
#29658: Use unittest.addCleanup to unregister lookups.
--------------------------------------+------------------------------------
     Reporter:  Mads Jensen           |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Core (Other)          |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Claude Paroz):

 * stage:  Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29658#comment:1>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.024f7617bb8eae6438870ecad5ae1a03%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29658: Use unittest.addCleanup to unregister lookups.

Django
In reply to this post by Django
#29658: Use unittest.addCleanup to unregister lookups.
-------------------------------------+-------------------------------------
     Reporter:  Mads Jensen          |                    Owner:  Dominic
         Type:                       |  White
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Dominic White):

 * status:  new => assigned
 * owner:  nobody => Dominic White


--
Ticket URL: <https://code.djangoproject.com/ticket/29658#comment:2>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.9925e9f2ef8595da71a88cdbc1f9996a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29658: Use unittest.addCleanup to unregister lookups.

Django
In reply to this post by Django
#29658: Use unittest.addCleanup to unregister lookups.
-------------------------------------+-------------------------------------
     Reporter:  Mads Jensen          |                    Owner:  Dominic
         Type:                       |  White
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Srinivas Reddy Thatiparthy):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/29658#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.a4fca27c66ecd246a9d9a0737d0724da%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29658: Use unittest.addCleanup to unregister lookups.

Django
In reply to this post by Django
#29658: Use unittest.addCleanup to unregister lookups.
-------------------------------------+-------------------------------------
     Reporter:  Mads Jensen          |                    Owner:  Srinivas
         Type:                       |  Reddy Thatiparthy
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Srinivas Reddy Thatiparthy):

 * owner:  Dominic White => Srinivas Reddy Thatiparthy


--
Ticket URL: <https://code.djangoproject.com/ticket/29658#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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.6999b9600c0db2bca0cfe51e759a870d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.