diff --git a/tools/install_and_test.py b/tools/install_and_test.py index 0142eeea4..b15c8eca5 100755 --- a/tools/install_and_test.py +++ b/tools/install_and_test.py @@ -49,7 +49,7 @@ def main(args): shutil.copy2("pytest.ini", temp_cwd) try: call_with_print(' '.join([ - sys.executable, '-m', 'pytest', pkg.replace('-', '_')]), cwd=temp_cwd) + sys.executable, '-m', 'pytest', '--pyargs', pkg.replace('-', '_')]), cwd=temp_cwd) finally: shutil.rmtree(temp_cwd) diff --git a/tox.cover.py b/tox.cover.py index c8a45d82d..008424641 100755 --- a/tox.cover.py +++ b/tox.cover.py @@ -48,8 +48,8 @@ def cover(package): .format(pkg_dir))) return - subprocess.check_call([ - sys.executable, '-m', 'pytest', '--cov', pkg_dir, '--cov-append', '--cov-report=', package]) + subprocess.check_call([sys.executable, '-m', 'pytest', '--pyargs', + '--cov', pkg_dir, '--cov-append', '--cov-report=', package]) subprocess.check_call([ sys.executable, '-m', 'coverage', 'report', '--fail-under', str(threshold), '--include', '{0}/*'.format(pkg_dir), '--show-missing']) diff --git a/tox.ini b/tox.ini index 76de2ea36..b66e330da 100644 --- a/tox.ini +++ b/tox.ini @@ -70,7 +70,7 @@ commands = {[base]install_and_test} {[base]all_packages} python tests/lock_test.py setenv = - PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto --pyargs} + PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto} PYTHONHASHSEED = 0 [testenv:py27-oldest]