failed to run python -m unittest discover tests/unit
Bug #1457162 reported by
Sergey Skripnick
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Fix Released
|
Medium
|
Sergey Skripnick |
Bug Description
Error when trying to run unittests without tox:
python -m unittest discover tests/unit
...
File "/usr/lib/
class Pdb(bdb.Bdb, cmd.Cmd):
AttributeError: 'module' object has no attribute 'Cmd'
All tests failed.
This is happened because of rally.cmd module.
pdb.py has following line:
import cmd
and in some cases it imports `rally.cmd` instead of standard python's `cmd` module.
This may cause other unexpected errors.
rally.cmd should be renamed. `cli` seems good name for it
Changed in rally: | |
importance: | Undecided → Medium |
Changed in rally: | |
assignee: | nobody → Sergey Skripnick (eyerediskin) |
status: | New → In Progress |
Changed in rally: | |
milestone: | none → 0.0.5 |
Changed in rally: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/184591 /git.openstack. org/cgit/ openstack/ rally/commit/ ?id=a9b635f62e1 666e51d7e0cc9b7 f5b77c2788e527
Committed: https:/
Submitter: Jenkins
Branch: master
commit a9b635f62e1666e 51d7e0cc9b7f5b7 7c2788e527
Author: Sergey Skripnick <email address hidden>
Date: Wed May 20 22:10:22 2015 +0300
Rename rally.cmd to rally.cli
There is module 'cmd' in standard library, and unittest's discover
does modify sys.path when running tests. This cause errors when running
unit tests in some environments (E.g. pycharm)
Change-Id: I4fd2d271da1b7f d300fbbeb6107aa 958e716fd2b
Closes-Bug: 1457162