summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2022-02-18 15:01:21 +0200
committerGitHub <noreply@github.com>2022-02-18 15:01:21 +0200
commit0169f756a2febbd6593a95d27981e9acf2d9e771 (patch)
tree12372f97138ba330a96b4048ea583e8ad7941f92
parentb1e80a1aef9bfa821d28f185ba8a94f970b0f21e (diff)
parent0a79268b027208cbb4dd19b83df52a9d10b794ef (diff)
downloadnumpy-0169f756a2febbd6593a95d27981e9acf2d9e771.tar.gz
Merge pull request #21086 from rgommers/bench-compare
DEV: fix `python runtests.py --bench-compare`
-rwxr-xr-xruntests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtests.py b/runtests.py
index ac057a358..5d48bfa7f 100755
--- a/runtests.py
+++ b/runtests.py
@@ -199,8 +199,9 @@ def main(argv):
os.environ.get('PYTHONPATH', '')
))
else:
- _temp = __import__(PROJECT_MODULE)
- site_dir = os.path.sep.join(_temp.__file__.split(os.path.sep)[:-2])
+ if not args.bench_compare:
+ _temp = __import__(PROJECT_MODULE)
+ site_dir = os.path.sep.join(_temp.__file__.split(os.path.sep)[:-2])
extra_argv = args.args[:]
if not args.bench: