From 4b74102e1ca2293e3320f2787b9ca708b15427ce Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Mon, 4 Jul 2016 14:29:38 +0200 Subject: [PATCH] Add pytest-runner to run tests with py.test on setup.py test --- .gitignore | 2 ++ pytest.ini | 3 +++ setup.cfg | 2 ++ setup.py | 8 ++++++++ 4 files changed, 15 insertions(+) create mode 100644 pytest.ini create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index 859edf6..a0392e5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ dist .settings .tox MANIFEST +.cache +.eggs diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..4f933da --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +addopts = --flake8 --isort --cov radicale radicale +norecursedirs = dist .cache .git build *.egg-info .eggs venv diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b7e4789 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[aliases] +test=pytest diff --git a/setup.py b/setup.py index 4de21e5..8411fdd 100755 --- a/setup.py +++ b/setup.py @@ -63,6 +63,14 @@ setup( provides=["radicale"], scripts=["bin/radicale"], install_requires=["vobject"], + setup_requires=['pytest-runner'], + tests_require=['pytest-cov', 'pytest-flake8', 'pytest-isort', 'pytest'], + extras_require={ + 'test': [ + 'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort', + 'pytest' + ] + }, keywords=["calendar", "addressbook", "CalDAV", "CardDAV"], classifiers=[ "Development Status :: 5 - Production/Stable",