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-allplanes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/kms-test-allplanes.py') diff --git a/tests/kms-test-allplanes.py b/tests/kms-test-allplanes.py index 710ae66..0fe6cfa 100755 --- a/tests/kms-test-allplanes.py +++ b/tests/kms-test-allplanes.py @@ -25,7 +25,7 @@ class AllPlanesTest(kmstest.KMSTest): connectors[crtc] = connector for crtc in self.card.crtcs: - self.start('composition on CRTC %u' % crtc.id) + self.start(f'composition on CRTC {crtc.id}') # Get the connector and default mode try: @@ -45,8 +45,8 @@ class AllPlanesTest(kmstest.KMSTest): self.skip('no plane available for CRTC') continue - self.logger.log('Testing connector %s, CRTC %u, mode %s with %u planes' % \ - (connector.fullname, crtc.id, mode.name, len(planes))) + self.logger.log(f'Testing connector {connector.fullname}, CRTC {crtc.id}, ' + f'mode {mode.name} with {len(planes)} planes') # Create a frame buffer fb = pykms.DumbFramebuffer(self.card, mode.hdisplay, mode.vdisplay, 'XR24') @@ -55,7 +55,7 @@ class AllPlanesTest(kmstest.KMSTest): # Set the mode with a primary plane 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.run(3) @@ -67,10 +67,10 @@ class AllPlanesTest(kmstest.KMSTest): destination = kmstest.Rect(offset, offset, fb.width, fb.height) ret = self.atomic_plane_set(plane, crtc, source, destination, fb) if ret < 0: - self.fail('atomic plane set failed with %d' % ret) + self.fail(f'atomic plane set failed with {ret}') break - self.logger.log('Adding plane %u' % plane.id) + self.logger.log(f'Adding plane {plane.id}') self.run(1) if self.flips == 0: -- cgit v1.2.3