]> granicus.if.org Git - python/commitdiff
regrtest: always show before/after of modified env (#1192) (#1406)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 3 May 2017 00:12:22 +0000 (02:12 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 00:12:22 +0000 (02:12 +0200)
Buildbots don't run tests with -vv and so only log "xxx was modified
by test_xxx" which is not enough to debug such random issue. In many
cases, I'm unable to reproduce the warning and so unable to fix it.

Always logging the value before and value after should help to debug
such warning on buildbots.
(cherry picked from commit ec4b17239d899550be4ee6104b61751bb3c70382)

Lib/test/libregrtest/save_env.py

index 96ad3af8df4cf79c4f91cd3d4dfb72b84844bcfe..8309f266bfbe9be715d86d678cecee6512e1aed7 100644 (file)
@@ -279,7 +279,6 @@ class saved_test_environment:
                 if not self.quiet and not self.pgo:
                     print(f"Warning -- {name} was modified by {self.testname}",
                           file=sys.stderr, flush=True)
-                    if self.verbose > 1:
-                        print(f"  Before: {original}\n  After:  {current} ",
-                              file=sys.stderr, flush=True)
+                    print(f"  Before: {original}\n  After:  {current} ",
+                          file=sys.stderr, flush=True)
         return False