Commit 8810250b authored by Jason R. Coombs's avatar Jason R. Coombs

Run tests with tox

parent 7edbffcc
......@@ -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
......
......@@ -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.
......
......@@ -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__':
......
[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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment