Pip uses some system tools - VCS related tools - in its tests, so you need to intall them (Linux):
sudo apt-get install subversion bzr git-core mercurial
Or downloading and installing Subversion, Bazaar, Git and Mercurial manually.
After all requirements (system and python) are installed, just run the following command:
$ python setup.py test
If you want to run only a selection of the tests, you’ll need to run them directly with nose instead. Create a virtualenv, and install required packages:
pip install nose virtualenv scripttest mock
Run nosetests:
nosetests
Or select just a single test to run:
cd tests; nosetests test_upgrade.py:test_uninstall_rollback
There was a problem with locales configuration when running tests in a Hudson CI Server that broke some tests. The problem was not with pip, but with locales configuration. Hudson was not setting LANG environment variable correctly, so the solution to fix it was changing default language to en_US.UTF-8. The following has been done in a Ubuntu Server 9.10 machine:
$ sudo locale-gen en_US en_US.UTF-8
$ sudo dpkg-reconfigure locales
$ sudo update-locale LANG=en_US.UTF-8