From 96e1b17be3bc1d11c4385a81c0210034b4e0c9a9 Mon Sep 17 00:00:00 2001 From: Shiz Date: Thu, 13 Mar 2014 16:49:16 +0100 Subject: [PATCH] Add testing configuration. --- .coveragerc | 3 +++ .gitignore | 3 +++ setup.py | 4 +++- tox.ini | 12 ++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .coveragerc create mode 100644 tox.ini diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..7e12171 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = True +source = pydle diff --git a/.gitignore b/.gitignore index 758c1e3..78359fe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ __pycache__ *.swo /docs/_build +/.coverage +/.tox +/*.egg-info diff --git a/setup.py b/setup.py index 5e4c1ae..779b301 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,9 @@ setup( requires=['tornado'], extras_require={ 'SASL': 'pure-sasl >=0.1.6', # for pydle.features.sasl - 'Generating documentation': 'sphinx_rtd_theme' # the Sphinx theme we use + 'Generating documentation': 'sphinx_rtd_theme', # the Sphinx theme we use + 'Running tests': 'pytest', # collect and run tests + 'Getting test case coverage': 'pytest-cov' # get test case coverage }, entry_points={ 'console_scripts': [ diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..5768de2 --- /dev/null +++ b/tox.ini @@ -0,0 +1,12 @@ +[tox] +envlist = py32,py33 + +[testenv] +deps = + pytest + pytest-cov +commands = py.test --cov pydle --cov-config .coveragerc --cov-report term-missing . + +[pytest] +markers = + slow: may take several seconds or more to complete.