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

  1. says

    Can I just say what a relief to find sooneme who actually knows what theyre talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I cant believe youre not more popular because you definitely have the gift.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">