py.test from behind a firewall

I wanted to try out pytest (or py.test, I’ve heard it both ways).
But I’m behind a firewall, so pip and easy_install don’t work that great.
I’m also running cygwin, with several versions of python so I can test compatibility of scripts across 2.6, 2.7, and 3.2.

Trial and error gets me to these steps that seem to work.

  1. download py
  2. unpack it to directory py147 (whatever you want to name it)
  3. download pytest
  4.  unpack it to directory pytest223 (again, whatever you want to name it)
  5. install py (see below)
  6. install pytest (see below)

In this example, I’ve got a symbolic link in my path called python27 that links to my python 2.7 executable.

[bash]
> cd py147
> python27 setup.py install
> cd ../pytest223
> python27 setup.py install

# now test it by running one of the pytest included scripts
> cd testing
> python27 -m pytest test_python.py
[/bash]

Splendid.
Now getting on to the task of examining it to see if it’s functionality meets my needs.

Update 4-June-2012:

I just tried this in a new machine and ran into an issue that distribute wasn’t installed.

This is fixed simply by downloading and installing  it and trying the rest again.

  1. download distribute
  2. unpack it to directory dist (whatever you want to name it)
  3. cd dist
  4. python27 setup.py install
  5. go back up to installing py and py.test (see above)

Comments