How to run unit test?

Asked by Wu Wenxiang

In other modules, running unit test is very easy: run-test.sh will build a virtual environment.
However I could find run-test.sh in swift.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Kun Huang
Solved:
Last query:
Last reply:
Revision history for this message
paul luse (paul-e-luse) said :
#1

So I'm a newbie but spent the whole weekend running and debugging unit tests so might be able to help. This link http://docs.openstack.org/developer/swift/development_guidelines.html has directions on setting up tox and then this link (near the bottom) showing AIO setup talks about it as well (how to run functests, unittests, probetests).

Revision history for this message
paul luse (paul-e-luse) said :
#2
Revision history for this message
ZhiQiang Fan (aji-zqfan) said :
#3

using tox instead(sudo pip install tox), you can specify the python interpret environment, for i.e. tox -e py27, or directly run tox which will try to check all unit test for py26,py27,py33,pep8

Revision history for this message
Best Kun Huang (academicgareth) said :
#4

run "./.unittests"

Revision history for this message
Wu Wenxiang (wu-wenxiang) said :
#5

Thanks Kun Huang, that solved my question.