aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-10-14 18:56:12 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-10-14 18:56:12 -0400
commit8810250b5ad5df929b0d4db37d676e6f494cbda5 (patch)
treefebde28bbf91b80b0ac7800ba6fa7b3abaaca286
parent7edbffcc92c89b96f37e9e007e0f7f9490c49232 (diff)
downloadexternal_python_setuptools-8810250b5ad5df929b0d4db37d676e6f494cbda5.tar.gz
external_python_setuptools-8810250b5ad5df929b0d4db37d676e6f494cbda5.tar.bz2
external_python_setuptools-8810250b5ad5df929b0d4db37d676e6f494cbda5.zip
Run tests with tox
-rw-r--r--.travis.yml4
-rw-r--r--docs/developer-guide.txt8
-rwxr-xr-xsetup.py10
-rw-r--r--tox.ini8
4 files changed, 10 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml
index b8bca7cc..45be20a1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,13 +14,13 @@ script:
# avoid VersionConflict when newer version is required
- pip install -U 'pytest>=3.0.2'
- # Output the env, because the travis docs just can't be trusted
+ # Output the env, to verify behavior
- env
# update egg_info based on setup.py in checkout
- python bootstrap.py
- - python setup.py test --addopts='-rsx'
+ - python -m tox
before_deploy:
- export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1
diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt
index 70e7f1cd..c8f51b02 100644
--- a/docs/developer-guide.txt
+++ b/docs/developer-guide.txt
@@ -89,12 +89,10 @@ For posterity, the old `Bitbucket mirror
Testing
-------
-The primary tests are run using py.test. To run the tests::
+The primary tests are run using tox. To run the tests, first make
+sure you have tox installed, then invoke it::
- $ python setup.py test
-
-Or install py.test into your environment and run ``PYTHONPATH=. py.test``
-or ``python -m pytest``.
+ $ tox
Under continuous integration, additional tests may be run. See the
``.travis.yml`` file for full details on the tests run under Travis-CI.
diff --git a/setup.py b/setup.py
index c3b556d5..2948e515 100755
--- a/setup.py
+++ b/setup.py
@@ -69,8 +69,6 @@ if include_windows_files:
package_data.setdefault('setuptools', []).extend(['*.exe'])
package_data.setdefault('setuptools.command', []).extend(['*.xml'])
-needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv)
-pytest_runner = ['pytest-runner'] if needs_pytest else []
needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv)
wheel = ['wheel'] if needs_wheel else []
@@ -178,14 +176,8 @@ setup_params = dict(
),
],
scripts=[],
- tests_require=[
- 'setuptools[ssl]',
- 'pytest-flake8',
- # pin pytest to 3.0.2 for pytest-dev/pytest#1888
- 'pytest==3.0.2',
- ] + (['mock'] if sys.version_info[:2] < (3, 3) else []),
setup_requires=[
- ] + pytest_runner + wheel,
+ ] + wheel,
)
if __name__ == '__main__':
diff --git a/tox.ini b/tox.ini
index 806e6ed2..770fbd86 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,9 +1,9 @@
-[tox]
-envlist = py26,py27,py33,py34,py35,pypy,pypy3
-
[testenv]
deps=
pytest-flake8
pytest>=3.0.2
+ setuptools[ssl]
+ py{26,27,32}: mock
+
passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir
-commands=python setup.py test --addopts='-rsx'
+commands=python -m pytest -rsx