Skip to content

Commit

Permalink
regrtest: always show before/after of modified env (python#1192)
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.
  • Loading branch information
vstinner authored Apr 19, 2017
1 parent 7b9619a commit ec4b172
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Lib/test/libregrtest/save_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
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

0 comments on commit ec4b172

Please sign in to comment.