Opened 4 years ago

Closed 4 years ago

#32516 closed Bug (fixed)

reorder_suite(reverse=True) isn't a strict reversal when duplicates are present

Reported by: Chris Jerdonek Owned by: Chris Jerdonek
Component: Testing framework Version: 3.1
Severity: Normal Keywords: reorder_suite
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

I noticed that when test duplicates are present, passing reverse=True to reorder_suite() isn't always a strict reversal. For example, if the tests given are [test1, test2, test3, test1], then the forward direction will be [test1, test2, test3], but the reversed direction will be [test1, test3, test2].

This should be easy to fix by reversing only after duplicates are removed. I would suggest fixing this only after PR #14085 is merged, since there will be less code at that point.

Change History (6)

comment:1 by Mariusz Felisiak, 4 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:2 by Chris Jerdonek, 4 years ago

Owner: changed from nobody to Chris Jerdonek

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 2e5aa444:

Fixed #32517 -- Made OrderedSet reversible.

Refs #32516.

comment:4 by Chris Jerdonek, 4 years ago

Has patch: set

comment:5 by Mariusz Felisiak, 4 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 77e0a35a:

Fixed #32516 -- Fixed reorder_suite() with duplicates and reverse=True.

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