Opened 8 months ago

Last modified 9 days ago

#27804 assigned Cleanup/optimization

Use unittest.subTest() in Django's test suite

Reported by: Tim Graham Owned by: Marcin Baranowski
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

With Python 3.4+ support on master, Django's test suite may use unittest.subTest in loops. This makes debugging test failures easier.

Change History (14)

comment:1 Changed 8 months ago by Tim Graham

I made an example change in the second commit of this PR.

comment:2 Changed 8 months ago by Hitesh Bhagchandani

Owner: changed from nobody to Hitesh Bhagchandani
Status: newassigned

comment:3 Changed 8 months ago by Tim Graham <timograham@…>

In f8d52521:

Refs #27804 -- Used subTest() in tests.utils_tests.test_html.

comment:4 Changed 7 months ago by Bruno Alla

Are you still working on this ticket Hitesh, or can I do some work on it?

comment:5 Changed 7 months ago by Bruno Alla

Owner: changed from Hitesh Bhagchandani to Bruno Alla

comment:6 Changed 4 months ago by Tim Graham <timograham@…>

In 6092ea8:

Refs #27804 -- Used subTest() in several tests.

comment:7 Changed 3 months ago by Tim Graham <timograham@…>

In 684c0a35:

Refs #27804 -- Used subTest() in dateparse tests.

comment:8 Changed 3 months ago by Tim Graham <timograham@…>

In ceb5f1c9:

Refs #27804 -- Used subTest() in urlpatterns_reverse tests.

comment:9 Changed 3 weeks ago by Tim Graham <timograham@…>

In feb1a0a:

Refs #27804 -- Used subTest() in a syndication test.

comment:10 Changed 3 weeks ago by Tim Graham <timograham@…>

In dea4cfb9:

Refs #27804 -- Used subTest() in a modeladmin test.

comment:11 Changed 9 days ago by Marcin Baranowski

Hi guys :),
are you still working on this ticket? Can I continue?

comment:12 Changed 9 days ago by Bruno Alla

Owner: Bruno Alla deleted
Status: assignednew

comment:13 Changed 9 days ago by Bruno Alla

Nope, go ahead!

comment:14 Changed 9 days ago by Marcin Baranowski

Owner: set to Marcin Baranowski
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top