Commit 413c2344 authored by Jason R. Coombs's avatar Jason R. Coombs

Monkeypatch the 'setuptools.__file__' attribute in test setup to be absolute. Workaround for #852.

parent b890d3d2
import os
pytest_plugins = 'setuptools.tests.fixtures'
def pytest_addoption(parser):
parser.addoption(
"--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__)
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