Page MenuHomePhabricator

use f-strings in test_framework (long lines)
ClosedPublic

Authored by PiRK on Mar 1 2023, 15:34.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC1fed83740f6a: 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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable