String formatting improvements for tests (#33663)

This commit is contained in:
Franck Nijhof
2020-04-05 00:26:08 +02:00
committed by GitHub
parent 1c25468b21
commit 906385172a
33 changed files with 129 additions and 155 deletions

View File

@@ -548,7 +548,7 @@ async def test_async_added_to_hass(hass):
for key, val in attr.items():
atr = state.attributes.get(key)
assert atr == val, "{}={} expected: {}".format(key, atr, val)
assert atr == val, f"{key}={atr} expected: {val}"
async def test_bad_platform(hass):