Skip to content

Commit

Permalink
add tox to test against multiple python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Sep 9, 2013
1 parent d79e332 commit 322a798
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ crate.egg-info
dist
build
*.pyc
.idea/
.idea/
.tox/
40 changes: 40 additions & 0 deletions DEVELOP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
========================
Crate-Python Development
========================


Development Setup
=================

To get a development environment crate-python uses `buildout
<https://pypi.python.org/pypi/zc.buildout/2.2.1>`_

Run `bootstrap.py`::

python bootstrap.py

And afterwards run buildout::

./bin/buildout -N

Running Tests
=============

The tests are run using the `zope.testrunner
<https://pypi.python.org/pypi/zope.testrunner/4.4.1>`_::

./bin/test

This will run all tests using the python interpreter that was used to
bootstrap buildout.

In addition to that it is also possible to run the test case against multiple
python interpreter using `tox <http://testrun.org/tox/latest/>`_::

./bin/tox

This required the interpreters `python2.7`, `python3.3` and `pypy` to be
available in `$PATH`. To run against a single interpreter tox can also be
invoked like this::

./bin/tox -e py33
5 changes: 5 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ extensions = lovely.buildouthttp
parts = test
scripts
crate
tox

[tox]
recipe = zc.recipe.egg:script
eggs = tox

[scripts]
recipe = zc.recipe.egg:script
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
envlist = pypy, py27, py33


[testenv]
usedevelop = True
deps =
zope.testrunner
lovely.testlayers
commands =
zope-testrunner -c --test-path=src
6 changes: 5 additions & 1 deletion versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ zc.recipe.egg = 2.0.0
zc.recipe.testrunner = 2.0.0
requests = 1.2.3
setuptools = 1.1
lovely.testlayers = 0.5.3
lovely.testlayers = 0.6.0
crate_server = 0.10.1

hexagonit.recipe.download = 1.7
Expand All @@ -28,3 +28,7 @@ zope.interface = 4.0.5
# Required by:
# zc.recipe.testrunner==2.0.0
zope.testrunner = 4.4.1

py = 1.4.15
tox = 1.6.1
virtualenv = 1.10.1

0 comments on commit 322a798

Please # to comment.