소스 검색

Merge pull request #527 from msabramo/pytest

tox.ini: Switch to use py.test
Mike Naberezny 10 년 전
부모
커밋
eb8396d620
2개의 변경된 파일19개의 추가작업 그리고 22개의 파일을 삭제
  1. 11 11
      setup.py
  2. 8 11
      tox.ini

+ 11 - 11
setup.py

@@ -28,10 +28,10 @@ if py_version < (3, 3):
     tests_require.append('mock')
 
 testing_extras = tests_require + [
-    'nose',
-    'coverage',
+    'pytest',
+    'pytest-cov',
     ]
-    
+
 from setuptools import setup, find_packages
 here = os.path.abspath(os.path.dirname(__file__))
 try:
@@ -71,7 +71,7 @@ dist = setup(
     license='BSD-derived (http://www.repoze.org/LICENSE.txt)',
     url='http://supervisord.org/',
     description="A system for controlling process state under UNIX",
-    long_description=README + '\n\n' +  CHANGES,
+    long_description=README + '\n\n' + CHANGES,
     classifiers=CLASSIFIERS,
     author="Chris McDonough",
     author_email="chrism@plope.com",
@@ -80,19 +80,19 @@ dist = setup(
     packages=find_packages(),
     install_requires=requires,
     extras_require={
-        'iterparse':['cElementTree >= 1.0.2'],
-        'testing':testing_extras,
+        'iterparse': ['cElementTree >= 1.0.2'],
+        'testing': testing_extras,
         },
     tests_require=tests_require,
     include_package_data=True,
     zip_safe=False,
     test_suite="supervisor.tests",
     entry_points={
-     'console_scripts': [
-         'supervisord = supervisor.supervisord:main',
-         'supervisorctl = supervisor.supervisorctl:main',
-         'echo_supervisord_conf = supervisor.confecho:main',
-         'pidproxy = supervisor.pidproxy:main',
+        'console_scripts': [
+            'supervisord = supervisor.supervisord:main',
+            'supervisorctl = supervisor.supervisorctl:main',
+            'echo_supervisord_conf = supervisor.confecho:main',
+            'pidproxy = supervisor.pidproxy:main',
         ],
     },
 )

+ 8 - 11
tox.ini

@@ -3,27 +3,24 @@ envlist =
     cover,cover3,py26,py27,py32,py33,py34,pypy
 
 [testenv]
-commands =
-    python setup.py test -q
 deps =
+    pytest >= 2.5.2
     meld3 >= 1.0.0
     mock >= 0.5.0
+commands =
+    py.test {posargs}
 
 [testenv:cover]
-basepython =
-    python2.6
+basepython = python2.6
 commands =
-    python setup.py nosetests --with-xunit --with-xcoverage --cover-package=supervisor --cover-erase
+    py.test --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs}
 deps =
     {[testenv]deps}
-    nose
-    coverage
-    nosexcover
+    pytest-cov
 
 [testenv:cover3]
-basepython =
-    python3.3
+basepython = python3.3
 commands =
-    python setup.py nosetests --with-xunit --with-xcoverage --cover-package=supervisor --cover-erase
+    py.test --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs}
 deps =
     {[testenv:cover]deps}