Răsfoiți Sursa

Add pytest-runner to run tests with py.test on setup.py test

Florian Mounier 9 ani în urmă
părinte
comite
4b74102e1c
4 a modificat fișierele cu 15 adăugiri și 0 ștergeri
  1. 2 0
      .gitignore
  2. 3 0
      pytest.ini
  3. 2 0
      setup.cfg
  4. 8 0
      setup.py

+ 2 - 0
.gitignore

@@ -8,3 +8,5 @@ dist
 .settings
 .tox
 MANIFEST
+.cache
+.eggs

+ 3 - 0
pytest.ini

@@ -0,0 +1,3 @@
+[pytest]
+addopts = --flake8 --isort --cov radicale radicale
+norecursedirs = dist .cache .git build *.egg-info .eggs venv

+ 2 - 0
setup.cfg

@@ -0,0 +1,2 @@
+[aliases]
+test=pytest

+ 8 - 0
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",