Change to run testr runner and provide coverage
Change-Id: I43c250b3960b2160cf3eb074ca7a227b06141326
This commit is contained in:
parent
ee5f6b8d4b
commit
dfea525cea
|
@ -59,3 +59,6 @@ target/
|
|||
# pbr makes these
|
||||
ChangeLog
|
||||
AUTHORS
|
||||
|
||||
cover/
|
||||
.testrepository/
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
||||
${PYTHON:-python} -m subunit.run discover ./tests $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
|
@ -1 +1,2 @@
|
|||
opencafe>=0.2.1,<0.2.2
|
||||
opencafe>=0.2.4,<0.2.5
|
||||
six>=1.9.0
|
|
@ -1,3 +1,15 @@
|
|||
flake8>=2.2.4,<=2.4.1
|
||||
nose
|
||||
unittest2
|
||||
coverage>=3.6
|
||||
discover
|
||||
fixtures>=1.3.1
|
||||
hacking<0.10,>=0.9.2
|
||||
mock>=1.2
|
||||
python-subunit>=0.0.18
|
||||
testrepository>=0.0.18
|
||||
testscenarios>=0.4
|
||||
testtools>=1.4.0
|
||||
|
||||
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
|
||||
beautifulsoup4
|
|
@ -15,12 +15,14 @@ limitations under the License.
|
|||
"""
|
||||
import unittest2 as unittest
|
||||
|
||||
import testtools
|
||||
|
||||
from xml.etree import ElementTree
|
||||
|
||||
from syntribos.tests.fuzz.datagen import FuzzMixin
|
||||
|
||||
|
||||
class FuzzMixinUnittest(unittest.TestCase):
|
||||
class FuzzMixinUnittest(testtools.TestCase):
|
||||
def test_fuzz_data_dict(self):
|
||||
data = {"a": {"b": "c", "ACTION_FIELD:d": "e"}}
|
||||
strings = ["test"]
|
||||
|
|
19
tox.ini
19
tox.ini
|
@ -4,27 +4,24 @@ skipsdist = True
|
|||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv=VIRTUAL_ENV={envdir}
|
||||
deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py27]
|
||||
commands=nosetests
|
||||
|
||||
[testenv:py34]
|
||||
commands=nosetests
|
||||
commands = cafe-config plugins install http
|
||||
python setup.py testr --coverage --slowest --testr-args='{posargs}'
|
||||
coverage combine
|
||||
coverage report -m
|
||||
coverage erase
|
||||
|
||||
[testenv:pep8]
|
||||
commands=flake8
|
||||
commands=flake8 {posargs} syntribos
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
show-source = True
|
||||
ignore = E123,E125
|
||||
ignore = E123,E125,H303,F403,H104,H302
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue