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-modeset.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/kms-test-modeset.py') diff --git a/tests/kms-test-modeset.py b/tests/kms-test-modeset.py index a6ba61c..e8b3d9a 100755 --- a/tests/kms-test-modeset.py +++ b/tests/kms-test-modeset.py @@ -13,7 +13,7 @@ class ModeSetTest(kmstest.KMSTest): def main(self): for connector in self.output_connectors(): - self.start('atomic mode set on connector %s' % connector.fullname) + self.start(f'atomic mode set on connector {connector.fullname}') # Skip disconnected connectors if not connector.connected(): @@ -36,8 +36,8 @@ class ModeSetTest(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 ModeSetTest(kmstest.KMSTest): # Perform a mode set ret = self.atomic_crtc_mode_set(crtc, connector, mode, fb) if ret < 0: - self.fail('atomic mode set failed with %d' % ret) + self.fail(f'atomic mode set failed with {ret}') continue self.logger.log('Atomic mode set complete') -- cgit v1.2.3