Ask Your Question
0

swift test virtualenv

asked 2011-03-28 09:17:49 -0600

armando-migliaccio gravatar image

Does swift use virtualenv for unit tests?

I tried

python2.6 setup.py --help-commands

but I couldn't see any option for that.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2011-03-28 16:21:51 -0600

armando-migliaccio gravatar image

Hi Clay,

thanks, that'll do it :)

I was asking because I am familiar with the way nova unit tests run.

Nova trunk has a run_test.sh script that lets you run tests in a virtual environment, and I wondered if there was a similar mechanism for swift (I think this is also how nova unit-tests are run in Hudson).

Cheers, Armando

edit flag offensive delete link more
0

answered 2011-03-28 16:09:27 -0600

clay-gerrard gravatar image

you can run swift unittests in a virtualenv, but it's not required. There's no utilities in the swift source tree specifically to help with setting up a virtualenv, but it should be straight-forward:

virtualenv swift cd swift . bin/activate

Here's most of my pip freeze if you want a requirements file:

echo "PasteDeploy==1.3.4 WebOb==1.0.1 coverage==3.4 eventlet==0.9.13 greenlet==0.3.1 netifaces==0.5 nose==1.0.0 pep8==0.6.1 simplejson==2.1.2 xattr==0.6.1" > requires.txt

pip install -r requires.txt

bzr branch lp:swift cd swift python setup.py develop ./.unittests

Let me know if there was something else you had in mind?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-03-28 09:17:49 -0600

Seen: 51 times

Last updated: Mar 28 '11