diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-08-13 16:21:21 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-08-14 13:50:40 +0200 |
commit | 080c2d97f51e95386bdb2c2edd9fb4c5b8f933ce (patch) | |
tree | 975d60876eecd238040a5f383c55135b4b17fe2d | |
parent | f399e489e2db052c235152ab9233dbdfa192985c (diff) |
Add nosetest and tox setup
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | requirements.txt | 3 | ||||
-rw-r--r-- | setup.cfg | 6 | ||||
-rw-r--r-- | setup.py | 1 | ||||
-rw-r--r-- | tox.ini | 18 |
5 files changed, 31 insertions, 0 deletions
@@ -2,6 +2,9 @@ *.index *.cache *.params +*.facts +*.pyc +.tox/ build/ dist/ *.egg-info/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8ebf0ae --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +nose +requests +responses diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0a5283b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[nosetests] +with-doctest=1 +exe=1 + +[flake8] +ignore = E501,F821 @@ -35,4 +35,5 @@ setup(name = "foreman_ansible_inventory", ], scripts = ['foreman_ansible_inventory.py'], requires = ["requests"], + tests_require=['responses'], ) @@ -0,0 +1,18 @@ +[tox] +envlist = pep8, py27 + +[testenv] +install_command = pip install {opts} {packages} +deps = -r{toxinidir}/requirements.txt +sitepackages = True + +[testenv:pep8] +deps = hacking +commands = + flake8 {posargs} + +[testenv:py27] +setenv = + PYTHONHASHSEED = 0 +commands = + python setup.py nosetests --verbosity=3 |