[Django] #27579: Alias Python 3's assertion names on Python 2 in SimpleTestCase

16 views
Skip to first unread message

Django

unread,
Dec 7, 2016, 7:55:20 AM12/7/16
to django-...@googlegroups.com
#27579: Alias Python 3's assertion names on Python 2 in SimpleTestCase
------------------------------------------------+------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
To minimize the usage of `six` so there's less changes to make when
dropping Python 2, the following Python 3 to Python 2 aliases could be
added:
{{{
assertCountEqual = unittest.TestCase.assertItemsEqual
assertNotRegex = unittest.TestCase.assertNotRegexpMatches
assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
assertRegex = unittest.TestCase.assertRegexpMatches
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27579>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 7, 2016, 7:55:32 AM12/7/16
to django-...@googlegroups.com
#27579: Alias Python 3's assertion names on Python 2 in SimpleTestCase
-------------------------------------+-------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/7662 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27579#comment:1>

Django

unread,
Dec 7, 2016, 5:32:10 PM12/7/16
to django-...@googlegroups.com
#27579: Alias Python 3's assertion names on Python 2 in SimpleTestCase
--------------------------------------+------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Simon Charette):

* stage: Unreviewed => Accepted


Comment:

Makes sense to me.

--
Ticket URL: <https://code.djangoproject.com/ticket/27579#comment:2>

Django

unread,
Dec 7, 2016, 5:36:45 PM12/7/16
to django-...@googlegroups.com
#27579: Alias Python 3's assertion names on Python 2 in SimpleTestCase
-------------------------------------+-------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27579#comment:3>

Django

unread,
Dec 7, 2016, 5:43:14 PM12/7/16
to django-...@googlegroups.com
#27579: Alias Python 3's assertion names on Python 2 in SimpleTestCase
-------------------------------------+-------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: | Status: closed
Cleanup/optimization |

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"b5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0" b5f0b347]:
{{{
#!CommitTicketReference repository=""
revision="b5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0"
Fixed #27579 -- Added aliases for Python 3's assertion names in
SimpleTestCase.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27579#comment:4>

Reply all
Reply to author
Forward
0 new messages