Opened 7 years ago

Closed 7 years ago

#27579 closed Cleanup/optimization (fixed)

Alias Python 3's assertion names on Python 2 in SimpleTestCase

Reported by: Tim Graham Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (4)

comment:1 by Tim Graham, 7 years ago

Has patch: set

comment:2 by Simon Charette, 7 years ago

Triage Stage: UnreviewedAccepted

Makes sense to me.

comment:3 by Simon Charette, 7 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by GitHub <noreply@…>, 7 years ago

Resolution: fixed
Status: newclosed

In b5f0b347:

Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.

Note: See TracTickets for help on using tickets.
Back to Top