diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2015-06-21 23:12:33 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2015-06-21 23:12:33 +0200 |
commit | 23e6b74a74857136a0fd2919f4d37da370d55ec4 (patch) | |
tree | b14d48efaebb3d8e27bfd44b1156bd7bd2e6c3f4 | |
parent | 0bf3045acfc314a3eba486505aec8e860c04fd8c (diff) | |
parent | 960d234ef342c6eafa532cba5e17ca86d1995360 (diff) | |
download | numpy-23e6b74a74857136a0fd2919f4d37da370d55ec4.tar.gz |
Merge pull request #5882 from njsmith/runtests-tweak
MAINT: make runtests.py --python and --ipython a little more ergonomic
-rwxr-xr-x | runtests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtests.py b/runtests.py index 738cd7769..cbba68b40 100755 --- a/runtests.py +++ b/runtests.py @@ -126,6 +126,9 @@ def main(argv): extra_argv = extra_argv[1:] if args.python: + # Debugging issues with warnings is much easier if you can see them + print("Enabling display of all warnings") + import warnings; warnings.filterwarnings("always") if extra_argv: # Don't use subprocess, since we don't want to include the # current path in PYTHONPATH. @@ -143,8 +146,12 @@ def main(argv): sys.exit(0) if args.ipython: + # Debugging issues with warnings is much easier if you can see them + print("Enabling display of all warnings and pre-importing numpy as np") + import warnings; warnings.filterwarnings("always") import IPython - IPython.embed(user_ns={}) + import numpy as np + IPython.embed(user_ns={"np": np}) sys.exit(0) if args.shell: |