Emit proper error message when tests.sort() failed

Bug #1243922 reported by Kui Shi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Triaged
Wishlist
Kui Shi

Bug Description

All test cases are sorted by tests.sort() in testtools/testsuite.py:sorted_tests(). The default sort key is test id, if there is error in test id, TypeError will be raised:
https://bugs.launchpad.net/python-heatclient/+bug/1243096

We'd better emit proper error message for developer to tell what has happened.

There is a pull request discussion here:
https://github.com/testing-cabal/testtools/pull/52

Changed in testtools:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Kui Shi (skuicloud) wrote :

The bug in heat client is fixed:
https://review.openstack.org/#/c/53759/

Duplicated test name in scenarios will induce the tests.sort() failed with TypeError: unorderable types, it should emit bettet prompt for this, or the __lt__ in testcase should be re-checked.

Changed in testtools:
assignee: nobody → Kui Shi (skuicloud)
Revision history for this message
Jonathan Lange (jml) wrote :

Reading through https://github.com/testing-cabal/testtools/pull/52 this is particularly a problem when there are duplicate test ids. See also #1390082

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.