test cases can not be sorted

Bug #1243096 reported by Kui Shi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Fix Released
Medium
Kui Shi

Bug Description

$ tox -e py33
GLOB sdist-make: /opt/osd/python-heatclient/setup.py
py33 inst-nodeps: /opt/osd/python-heatclient/.tox/dist/python-heatclient-0.2.5.11.g6376cd7.zip
py33 runtests: commands[0] | python setup.py testr --slowest --testr-args=
running testr
running=${PYTHON:-python} -m subunit.run discover -t ./ . --list
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/lib/python3.3/runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "/opt/osd/python-heatclient/.tox/py33/lib/python3.3/site-packages/subunit/run.py", line 124, in <module>
    main()
  File "/opt/osd/python-heatclient/.tox/py33/lib/python3.3/site-packages/subunit/run.py", line 120, in main
    stdout=sys.stdout)
  File "/opt/osd/python-heatclient/.tox/py33/lib/python3.3/site-packages/testtools/run.py", line 175, in __init__
    self.parseArgs(argv)
  File "/opt/osd/python-heatclient/.tox/py33/lib/python3.3/site-packages/testtools/run.py", line 214, in parseArgs
    self._do_discovery(argv[2:])
  File "/opt/osd/python-heatclient/.tox/py33/lib/python3.3/site-packages/testtools/run.py", line 333, in _do_discovery
    self.test = sorted_tests(loaded)
  File "/opt/osd/python-heatclient/.tox/py33/lib/python3.3/site-packages/testtools/testsuite.py", line 310, in sorted_tests
    tests.sort()
TypeError: unorderable types: StackManagerNoPaginationTest() < StackManagerNoPaginationTest()
Non-zero exit code (1) from test listing. stdout=b'', stderr=None
error: testr failed (3)

Kui Shi (skuicloud)
Changed in python-heatclient:
assignee: nobody → Kui Shi (skuicloud)
Revision history for this message
Robert Collins (lifeless) wrote :

Those types need to provide __cmp__ to be sortable, in Python3 objects aren't comparable otherwise.

Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :

We've looked into this on the testtools side- looks like you've got the same test id twice in your test suite, which is a bug in it's own right - in the heat test suite. Fix that, this issue will go away (and please open a bug on launchpad.net/testtools about the fact the error you got was misleading).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/53759

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/53759
Committed: http://github.com/openstack/python-heatclient/commit/30032302f359985335d50e80abb03ba901143168
Submitter: Jenkins
Branch: master

commit 30032302f359985335d50e80abb03ba901143168
Author: Kui Shi <email address hidden>
Date: Thu Oct 24 17:40:22 2013 +0800

    Fix the testname of scenario

    Duplicated testname in scenarios will result duplicated testname
    by testscenarios, they can not be sorted in PY33 env, and will
    induce TypeError:
    TypeError: unorderable types: StackManagerNoPaginationTest() <
    StackManagerNoPaginationTest()

    Close-Bug #1243096

    Change-Id: I4c02c9f3868495ec4399f795e864f26afc3d26b7

Changed in python-heatclient:
milestone: none → v0.2.7
status: New → Fix Committed
importance: Undecided → Medium
Changed in python-heatclient:
status: Fix Committed → Fix Released
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.