# HG changeset patch # User Mads Kiilerich # Date 1469716114 -7200 # Node ID dd676fdeda0fab2921ce79f2d2f797c6159d1603 # Parent 51b1af58589bf975eacf187d6f613d210b3f1db5 setup: move test dependencies to dev_requirements.txt to make them optional Remove the need for having test tools on production systems. Installing test dependencies is made an extra explicit step. pip is the future, but doesn't have the same tests_require features as setuptools kind of has. I don't like this way of handling it without setup.py support and with explicit naming of the ugly dev_requirements.txt ... but that seems to be the way to do it. diff -r 51b1af58589b -r dd676fdeda0f dev_requirements.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev_requirements.txt Thu Jul 28 16:28:34 2016 +0200 @@ -0,0 +1,6 @@ +pytest>=2.7.0,<3.0 +pytest-runner +pytest-sugar>=0.7.0,<1.0.0 +webtest==1.4.3 +mock +sphinx diff -r 51b1af58589b -r dd676fdeda0f docs/contributing.rst --- a/docs/contributing.rst Wed Jul 13 21:39:14 2016 +0200 +++ b/docs/contributing.rst Thu Jul 28 16:28:34 2016 +0200 @@ -48,11 +48,15 @@ Running tests ------------- -After finishing your changes make sure all tests pass cleanly. You can run -the testsuite by running ``py.test`` from the project root:: +After finishing your changes make sure all tests pass cleanly. Install the test +dependencies, then run the testsuite by invoking ``py.test`` from the +project root:: + pip install -r dev_requirements.txt py.test +Note that testing on Python 2.6 also requires ``unittest2``. + You can also use ``tox`` to run the tests with all supported Python versions (currently Python 2.6--2.7). diff -r 51b1af58589b -r dd676fdeda0f setup.py --- a/setup.py Wed Jul 13 21:39:14 2016 +0200 +++ b/setup.py Thu Jul 28 16:28:34 2016 +0200 @@ -38,7 +38,6 @@ "alembic>=0.8.0,<0.9", "waitress==0.8.8", "webob>=1.0.8,<=1.1.1", - "webtest==1.4.3", "Pylons>=1.0.0,<=1.0.2", "Beaker==1.6.4", "WebHelpers==1.3", @@ -52,24 +51,19 @@ "python-dateutil>=1.5.0,<2.0.0", "markdown==2.2.1", "docutils>=0.8.1,<=0.11", - "mock", "URLObject==2.3.4", "Routes==1.13", - "pytest>=2.7.0,<3.0", - "pytest-sugar>=0.7.0,<1.0.0", "dulwich>=0.14.1", "mercurial>=2.9,<3.9", ] if sys.version_info < (2, 7): requirements.append("importlib==1.0.1") - requirements.append("unittest2") requirements.append("argparse") if not is_windows: requirements.append("bcrypt>=2.0.0") - dependency_links = [ ] @@ -147,9 +141,7 @@ url=__url__, install_requires=requirements, classifiers=classifiers, - setup_requires=['PasteScript>=1.6.3', - 'pytest-runner'], - tests_require=['pytest'], + setup_requires=['PasteScript>=1.6.3'], data_files=data_files, packages=packages, include_package_data=True, diff -r 51b1af58589b -r dd676fdeda0f tox.ini --- a/tox.ini Wed Jul 13 21:39:14 2016 +0200 +++ b/tox.ini Thu Jul 28 16:28:34 2016 +0200 @@ -6,7 +6,8 @@ setenv = PYTHONHASHSEED = 0 deps = - pytest: pytest + -r{toxinidir}/dev_requirements.txt + py26-pytest: unittest2 python-ldap python-pam commands =