summaryrefslogtreecommitdiff
path: root/runtests.py
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2022-02-18 04:11:38 +0100
committerRalf Gommers <ralf.gommers@gmail.com>2022-02-18 04:11:38 +0100
commit0a79268b027208cbb4dd19b83df52a9d10b794ef (patch)
tree2969b1b24882aea606b1f64efcd71a86246ab45d /runtests.py
parent1168868df63678e5704acd866fafcf40dc849481 (diff)
downloadnumpy-0a79268b027208cbb4dd19b83df52a9d10b794ef.tar.gz
DEV: fix `python runtests.py --bench-compare`
[skip azurepipelines] [skip travis] Closes gh-20355
Diffstat (limited to 'runtests.py')
-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: