Commit 5c940698 authored by Jason R. Coombs's avatar Jason R. Coombs

Use py.test to launch pytest, rather than python -m test, preventing the empty...

Use py.test to launch pytest, rather than python -m test, preventing the empty path from being added to sys.path per pytest-dev/pytest#2104. Fixes #852. Also use 'usedevelop' as the setuptools.tests.fixtures aren't available in a standard install.
parent 1a273f3d
import os
pytest_plugins = 'setuptools.tests.fixtures'
......@@ -9,17 +6,3 @@ def pytest_addoption(parser):
"--package_name", action="append", default=[],
help="list of package_name to pass to test functions",
)
def pytest_configure():
_issue_852_workaround()
def _issue_852_workaround():
"""
Patch 'setuptools.__file__' with an absolute path
for forward compatibility with Python 3.
Workaround for https://github.com/pypa/setuptools/issues/852
"""
setuptools = __import__('setuptools')
setuptools.__file__ = os.path.abspath(setuptools.__file__)
[testenv]
deps=-rtests/requirements.txt
passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR
commands=python -m pytest {posargs:-rsx}
commands=py.test {posargs:-rsx}
usedevelop=True
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