Skip to content

Commit

Permalink
regrtest: always show before/after of modified env (#1407)
Browse files Browse the repository at this point in the history
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 ec4b172)
  • Loading branch information
vstinner committed May 3, 2017
1 parent 0d9d618 commit 2298235
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Lib/test/regrtest.py
Expand Up @@ -1267,10 +1267,9 @@ def __exit__(self, exc_type, exc_val, exc_tb):
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


Expand Down

0 comments on commit 2298235

Please sign in to comment.