From d5be2a716a1fda1d3f2f07d985dd60ba0a486c25 Mon Sep 17 00:00:00 2001 From: Christopher Harris Date: Thu, 6 Dec 2018 16:39:27 -0600 Subject: [PATCH 1/2] Fix SystemExit exception when running test via codelens Updates `sys.exit(...)` to `os._exit(...)`, which is similar but does not raise an exception before exiting. --- pythonFiles/testlauncher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonFiles/testlauncher.py b/pythonFiles/testlauncher.py index 5ce4532347f6..26adf2647aef 100644 --- a/pythonFiles/testlauncher.py +++ b/pythonFiles/testlauncher.py @@ -33,7 +33,7 @@ def exclude_current_file_from_debugger(): raw_input() except NameError: input() - sys.exit(1) + os._exit(1) def run(cwd, testRunner, args): @@ -53,7 +53,7 @@ def run(cwd, testRunner, args): else: import nose nose.run(argv=args) - sys.exit(0) + os._exit(0) finally: pass From fd0df3ab6977eb5a5c3732a7f02e6867982ca7c5 Mon Sep 17 00:00:00 2001 From: Christopher Harris Date: Thu, 6 Dec 2018 16:52:09 -0600 Subject: [PATCH 2/2] Create 3530.md --- news/2 Fixes/3530.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/2 Fixes/3530.md diff --git a/news/2 Fixes/3530.md b/news/2 Fixes/3530.md new file mode 100644 index 000000000000..20abb3e6bef5 --- /dev/null +++ b/news/2 Fixes/3530.md @@ -0,0 +1 @@ +Tests debugged via CodeLens no longer break for a `SystemExit` exception after successful test completion.