]> granicus.if.org Git - python/commitdiff
regrtest: always show before/after of modified env (#1407)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 3 May 2017 00:12:34 +0000 (02:12 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 00:12:34 +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/regrtest.py

index 12909ec4778319731003a95baba3fee2c33c8816..d7ca07b6647986a606820eae5e7d3d98c37fc8d9 100755 (executable)
@@ -1267,10 +1267,9 @@ class saved_test_environment:
                     print("Warning -- {} was modified by {}".format(
                                                  name, self.testname),
                                                  file=sys.stderr)
-                    if self.verbose > 1 and not self.pgo:
-                        print("  Before: {}\n  After:  {} ".format(
-                                                  original, current),
-                                                  file=sys.stderr)
+                    print("  Before: {}\n  After:  {} ".format(
+                                              original, current),
+                                              file=sys.stderr)
         return False