cpython: 2e23f7b9515c (original) (raw)
Mercurial > cpython
changeset 102838:2e23f7b9515c
Issue #27829: libregrtest.save_env: flush stderr Use flush=True to try to get a warning which is missing in buildbots. Use also f-string to make the code shorter. [#27829]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Mon, 22 Aug 2016 14:29:54 +0200 |
parents | 13b13f4ad285 |
children | 7d90bf4780ff |
files | Lib/test/libregrtest/save_env.py |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-)[+] [-] Lib/test/libregrtest/save_env.py 10 |
line wrap: on
line diff
--- a/Lib/test/libregrtest/save_env.py +++ b/Lib/test/libregrtest/save_env.py @@ -277,11 +277,9 @@ class saved_test_environment: self.changed = True restore(original) if not self.quiet and not self.pgo:
print("Warning -- {} was modified by {}".format([](#l1.7)
name, self.testname),[](#l1.8)
file=sys.stderr)[](#l1.9)
print(f"Warning -- {name} was modified by {self.testname}",[](#l1.10)
file=sys.stderr, flush=True)[](#l1.11) if self.verbose > 1:[](#l1.12)
print(" Before: {}\n After: {} ".format([](#l1.13)
original, current),[](#l1.14)
file=sys.stderr)[](#l1.15)
print(f" Before: {original}\n After: {current} ",[](#l1.16)
file=sys.stderr, flush=True)[](#l1.17) return False[](#l1.18)