From dcbc93a117b0efaa0e42fa6359eed4a71a9ca341 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 10 Jun 2022 02:04:30 +0300 Subject: tests: Convert to formatted string literals Use formatted string literals to replace legacy printf-style string formatting. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- tests/kms-test-modes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/kms-test-modes.py') diff --git a/tests/kms-test-modes.py b/tests/kms-test-modes.py index 433bb0b..c478489 100755 --- a/tests/kms-test-modes.py +++ b/tests/kms-test-modes.py @@ -12,8 +12,8 @@ class ModesTest(kmstest.KMSTest): self.logger.log('Page flip complete') def test_mode(self, connector, crtc, mode): - self.logger.log('Testing connector %s on CRTC %u with mode %s' % \ - (connector.fullname, crtc.id, mode.name)) + self.logger.log(f'Testing connector {connector.fullname} ' + f'on CRTC {crtc.id} with mode {mode.name}') # Create a frame buffer fb = pykms.DumbFramebuffer(self.card, mode.hdisplay, mode.vdisplay, 'XR24') @@ -22,7 +22,7 @@ class ModesTest(kmstest.KMSTest): # Perform the mode set ret = self.atomic_crtc_mode_set(crtc, connector, mode, fb) if ret < 0: - raise RuntimeError('atomic mode set failed with %d' % ret) + raise RuntimeError(f'atomic mode set failed with {ret}') self.logger.log('Atomic mode set complete') self.run(4) @@ -33,7 +33,7 @@ class ModesTest(kmstest.KMSTest): def main(self): for connector in self.output_connectors(): - self.start('modes on connector %s' % connector.fullname) + self.start(f'modes on connector {connector.fullname}') # Skip disconnected connectors if not connector.connected(): -- cgit v1.2.3