diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-10 15:16:19 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-10 15:16:19 -0500 |
commit | 86af5c21cd3391de595f23cdb61097591f75a9ba (patch) | |
tree | 703300b114bd83c1546202dbdff6565bdb179411 /ptr.py | |
parent | d10016a7178bc3677ce7410b0ed075ecde02978c (diff) | |
download | pytest-runner-86af5c21cd3391de595f23cdb61097591f75a9ba.tar.gz |
Use project_on_sys_path context from Setuptools 22.0.1.
Diffstat (limited to 'ptr.py')
-rw-r--r-- | ptr.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -188,7 +188,8 @@ class PyTest(orig.test): return paths = map(_operator.attrgetter('location'), installed_dists) with self.paths_on_pythonpath(paths): - self.with_project_on_sys_path(self.run_tests) + with self.project_on_sys_path(): + return self.run_tests() @property def _argv(self): @@ -196,7 +197,7 @@ class PyTest(orig.test): def run_tests(self): """ - Invoke pytest, replacing argv. + Invoke pytest, replacing argv. Return result code. """ with _save_argv(_sys.argv[:1] + self.addopts): result_code = __import__('pytest').main() |