HomePhabricator

use f-strings in test_framework (long lines)

Description

use f-strings in test_framework (long lines)

Summary:
This is a follow-up to D13199 for multiline strings that were not processed by flynt

Also replace repr(thing) by f"{thing!r}" which is more compact.
I suspect most of these are uneccessary, as str(thing) and repr(thing) are usually the same for objects that only define a __repr__ method and no __str__ method. But there are too many of them to check them all.

Depends on D13212

Test Plan:
ninja check-functional-extended

Re-run with a failing test (add assert False somewhere) and check the formatting of the combine_logs.py hint line. Run this combine_logs.py ... | grep "^ test " command and check that the representation of the various messages and objects from messages.py looks normal.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13215

Details

Provenance
PiRKAuthored on Mar 1 2023, 15:18
PiRKPushed on Mar 1 2023, 18:17
Reviewer
Restricted Project
Differential Revision
D13215: use f-strings in test_framework (long lines)
Parents
rABC28299c3c4142: [tests] use f-string instead of .format(*tuple)
Branches
Unknown
Tags
Unknown