I'm trying to hack on Peon, so far I've not been able to successfuly run the tests.
Here are the steps I took to setup my dev environment to start hacking on peon. Just in case someone else needs them.
Note
These steps were attempted on my Windows 7 (x64) machine. YMMV.
These steps assume that you are on a windows dev machine and that you have cloned the peon repo and that you are in the repo working directory. e.g:
C:\Users\Me\Projects\peon
FYI: If the specloud dependencies were easier to install on Windows, the setup would be simpler. i.e. ideally the project would have a requirements file (dev-requirements.txt) like:
Contents of dev-requirements.txt:
# for running the BDD style specs
# this would install nose, figleaf and pinocchio
specloud
# for rspec "should" style BDD assertions
should-dsl
# for isolating file io in tests
ScriptTest
I would then install all the dependencies for development like so:
> pip install -E \path\to\my\peon\venv -r dev-requirements.txt
Then I would install peon in development mode:
> python setup.py develop
And finally, I would run the specs/tests from the project root like so:
> specloud
...
----------------------------------------------------------------------
Ran X tests in 0.220s
Sweet! :)
Alas, this is not a perfect world. I've not been able to successfully install and run the pinocchio plugin for nose on Windows. So I used a workaround to get up an running. Note that these steps only got me as far as seeing two failing tests. Here are my setup steps:
Create and activate a virtualenv for peon:
> virtualenv \path\to\my\peon\venv --no-site-packages > peon\venv\Scripts\activate
Now the rest of these steps take place in the peon virtualenv
Install peon in development mode:
> python setup.py develop
3. Create spec-runner command/batch file in project root to implement a stripped down version of specloud:
Contents of spec-runner.cmd:
nosetests -i "^(it|ensure|must|should|specs?|examples?|deve)" -i "(specs?(.py)?|examples?(.py)?)$"
I noticed that the tests/base.py module, attempts to add the peon directory to the python path (so that it can be imported). Instead of doing this:
package_dir = os.path.dirname(here)
peon_src_dir = os.path.join(package_dir, 'peon')
It should rather be this:
package_dir = os.path.dirname(here)
peon_src_dir = os.path.join(package_dir, '..', 'peon') # go up on step!
In any case this does not matter if peon has been installed in development mode.