change test module importing behaviour to append to sys.path
instead of prepending. This better allows to run test modules against installated versions of a package even if the package under test has the same import root. In this example:: testing/__init__.py testing/test_pkg_under_test.py pkg_under_test/ the tests will preferrably run against the installed version of pkg_under_test whereas before they would always pick up the local version. --HG-- branch : prefer_installed
This commit is contained in:
@@ -31,12 +31,12 @@ def get_version():
|
||||
def has_environment_marker_support():
|
||||
"""
|
||||
Tests that setuptools has support for PEP-426 environment marker support.
|
||||
|
||||
The first known release to support it is 0.7 (and the earliest on PyPI seems to be 0.7.2
|
||||
|
||||
The first known release to support it is 0.7 (and the earliest on PyPI seems to be 0.7.2
|
||||
so we're using that), see: http://pythonhosted.org/setuptools/history.html#id142
|
||||
|
||||
|
||||
References:
|
||||
|
||||
|
||||
* https://wheel.readthedocs.org/en/latest/index.html#defining-conditional-dependencies
|
||||
* https://www.python.org/dev/peps/pep-0426/#environment-markers
|
||||
"""
|
||||
@@ -48,7 +48,7 @@ def has_environment_marker_support():
|
||||
|
||||
|
||||
def main():
|
||||
install_requires = ['py>=1.4.25']
|
||||
install_requires = ['py>=1.4.27.dev2']
|
||||
extras_require = {}
|
||||
if has_environment_marker_support():
|
||||
extras_require[':python_version=="2.6" or python_version=="3.0" or python_version=="3.1"'] = ['argparse']
|
||||
|
||||
Reference in New Issue
Block a user