add tox configuration file

From the project webpage:

"""
Tox is a generic virtualenv management and test command line tool you can use
for:

- checking your package installs correctly with different Python versions and
  interpreters
- running your tests in each of the environments, configuring your test tool of
  choice
- acting as a frontend to Continuous Integration servers, greatly reducing
  boilerplate and merging CI and shell-based testing.
"""
This commit is contained in:
Fernand Lone-Sang 2015-02-04 14:22:43 +01:00
parent cd3f932f77
commit ba1869f658
2 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ libqpol/policy_scan.c
setools/policyrep/qpol_wrap.c
setools/policyrep/qpol.py
*.so
/.tox

27
tox.ini Normal file
View File

@ -0,0 +1,27 @@
[tox]
envlist = py27, py33, py34
[testenv:pep8]
deps = pep8
commands = pep8 setools/ setools/policyrep/ tests/ \
seinfo seinfoflow sedta sesearch \
--exclude qpol.py --statistics --max-line-length=100
[testenv:coverage]
deps = networkx==1.9
coverage
commands = coverage erase
coverage run setup.py test
coverage report
[testenv:coverage-html]
deps = networkx==1.9
coverage
commands = coverage erase
coverage run setup.py test
coverage report
coverage html
[testenv]
deps = networkx==1.9
commands = {envpython} setup.py test