Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 564e89f

Browse files
authored
regrtest: always show before/after of modified env (#1192) (#1406)
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)
1 parent 0c2ff08 commit 564e89f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/test/libregrtest/save_env.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
279279
if not self.quiet and not self.pgo:
280280
print(f"Warning -- {name} was modified by {self.testname}",
281281
file=sys.stderr, flush=True)
282-
if self.verbose > 1:
283-
print(f" Before: {original}\n After: {current} ",
284-
file=sys.stderr, flush=True)
282+
print(f" Before: {original}\n After: {current} ",
283+
file=sys.stderr, flush=True)
285284
return False

0 commit comments

Comments
 (0)