summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-07-03 09:15:58 (GMT)
committerGitHub <noreply@github.com>2017-07-03 09:15:58 (GMT)
commit5e87592fd12e0b7c41edc11d4885ed7298d5063b (patch)
tree55a9162c8208b947829436773fea57a663d5099c /Lib/test/libregrtest
parent34b54873b51a1ebee2a3c57b7205537b4f33128d (diff)
downloadcpython-5e87592fd12e0b7c41edc11d4885ed7298d5063b.zip
cpython-5e87592fd12e0b7c41edc11d4885ed7298d5063b.tar.gz
cpython-5e87592fd12e0b7c41edc11d4885ed7298d5063b.tar.bz2
bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)
--forever now stops if a fail changes the environment.
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r--Lib/test/libregrtest/main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 571eb61..bc8155b 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"