From cac4c1c968c9f2b39b564b5388183e2830aa83b5 Mon Sep 17 00:00:00 2001 From: u214892 <u214892@sbb.ch> Date: Fri, 20 Sep 2019 10:02:36 +0200 Subject: [PATCH] #163 random guesses --- benchmarks/run_all_examples.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/benchmarks/run_all_examples.py b/benchmarks/run_all_examples.py index d2718229..b169902d 100644 --- a/benchmarks/run_all_examples.py +++ b/benchmarks/run_all_examples.py @@ -25,12 +25,12 @@ for entry in [entry for entry in importlib_resources.contents('examples') if print("*****************************************************************") print("Running {}".format(entry)) print("*****************************************************************") -# with swap_attr(sys, "stdin", StringIO("q")): -# try: -# runpy.run_path(file_in, run_name="__main__", init_globals={ -# 'argv': ['--sleep-for-animation=False'] -# }) -# except Exception as e: -# print(e) -# print("runpy done.") -# print("Done with {}".format(entry)) + with swap_attr(sys, "stdin", StringIO("q")): + try: + runpy.run_path(file_in, run_name="__main__", init_globals={ + 'argv': ['--sleep-for-animation=False'] + }) + except Exception as e: + print(e) + print("runpy done.") + print("Done with {}".format(entry)) -- GitLab