From: Victor Stinner Date: Mon, 3 Jul 2017 09:15:58 +0000 (+0200) Subject: bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) X-Git-Tag: v3.7.0a1~473 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e87592fd12e0b7c41edc11d4885ed7298d5063b;p=thirdparty%2FPython%2Fcpython.git bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) --forever now stops if a fail changes the environment. --- diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index 571eb6112520..bc8155bbff2b 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -415,6 +415,8 @@ class Regrtest: yield test if self.bad: return + if self.ns.fail_env_changed and self.environment_changed: + return def display_header(self): # Print basic platform information @@ -478,7 +480,7 @@ class Regrtest: result = "FAILURE" elif self.interrupted: result = "INTERRUPTED" - elif self.environment_changed and self.ns.fail_env_changed: + elif self.ns.fail_env_changed and self.environment_changed: result = "ENV CHANGED" else: result = "SUCCESS"