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-legacy-modeset.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/kms-test-legacy-modeset.py') diff --git a/tests/kms-test-legacy-modeset.py b/tests/kms-test-legacy-modeset.py index f856178..06ecead 100755 --- a/tests/kms-test-legacy-modeset.py +++ b/tests/kms-test-legacy-modeset.py @@ -13,7 +13,7 @@ class LegacyModeSetTest(kmstest.KMSTest): def main(self): for connector in self.output_connectors(): - self.start('legacy mode set on connector %s' % connector.fullname) + self.start(f'legacy mode set on connector {connector.fullname}') # Skip disconnected connectors if not connector.connected(): @@ -36,8 +36,8 @@ class LegacyModeSetTest(kmstest.KMSTest): self.skip('no mode available') continue - 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') @@ -46,7 +46,7 @@ class LegacyModeSetTest(kmstest.KMSTest): # Perform a mode set ret = crtc.set_mode(connector, fb, mode) if ret < 0: - self.fail('legacy mode set failed with %d' % ret) + self.fail(f'legacy mode set failed with {ret}') continue self.logger.log('Legacy mode set complete') @@ -54,7 +54,7 @@ class LegacyModeSetTest(kmstest.KMSTest): ret = crtc.disable_mode() if ret < 0: - self.fail('legacy mode set disable failed with %d' % ret) + self.fail(f'legacy mode set disable failed with {ret}') continue self.success() -- cgit v1.2.3