summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-07-03 10:50:36 (GMT)
committerGitHub <noreply@github.com>2017-07-03 10:50:36 (GMT)
commit4132adb4b8f90893d8f19ff46edff56f189faca0 (patch)
treef104cd8144474f7e246339513a91184882510ba5 /Lib
parentbfdc6fdc0e76204caf2261f9cfa9d232fc23906a (diff)
downloadcpython-4132adb4b8f90893d8f19ff46edff56f189faca0.zip
cpython-4132adb4b8f90893d8f19ff46edff56f189faca0.tar.gz
cpython-4132adb4b8f90893d8f19ff46edff56f189faca0.tar.bz2
bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)
--forever now stops if a fail changes the environment. (cherry picked from commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b)
Diffstat (limited to 'Lib')
-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"