From 86af5c21cd3391de595f23cdb61097591f75a9ba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 15:16:19 -0500 Subject: Use project_on_sys_path context from Setuptools 22.0.1. --- ptr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ptr.py') diff --git a/ptr.py b/ptr.py index b238a1e..e270ff8 100644 --- a/ptr.py +++ b/ptr.py @@ -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() -- cgit v1.2.1