[Python-checkins] cpython: regrtest: set interrupted to True if re-run is interrupted

victor.stinner python-checkins at python.org
Wed Aug 17 10:14:18 EDT 2016


https://hg.python.org/cpython/rev/11571aa83ea1
changeset:   102731:11571aa83ea1
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Aug 17 16:00:12 2016 +0200
summary:
  regrtest: set interrupted to True if re-run is interrupted

files:
  Lib/test/libregrtest/main.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -254,6 +254,7 @@
                 self.ns.verbose = True
                 ok = runtest(self.ns, test)
             except KeyboardInterrupt:
+                self.interrupted = True
                 # print a newline separate from the ^C
                 print()
                 break
@@ -341,8 +342,8 @@
                 try:
                     result = runtest(self.ns, test)
                 except KeyboardInterrupt:
+                    self.interrupted = True
                     self.accumulate_result(test, (INTERRUPTED, None))
-                    self.interrupted = True
                     break
                 else:
                     self.accumulate_result(test, result)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list