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-routing.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/kms-test-routing.py') diff --git a/tests/kms-test-routing.py b/tests/kms-test-routing.py index 69f8be1..68aff9c 100755 --- a/tests/kms-test-routing.py +++ b/tests/kms-test-routing.py @@ -64,10 +64,10 @@ class RoutingTest(kmstest.KMSTest): fb = pykms.DumbFramebuffer(self.card, max_hdisplay, max_vdisplay, 'XR24') pykms.draw_test_pattern(fb) - self.start('Moving connector %s between CRTCs %s' % \ - (shared_connector.fullname, [pipe.crtc.id for pipe in pipes])) + self.start(f'Moving connector {shared_connector.fullname} ' + f'between CRTCs {[pipe.crtc.id for pipe in pipes]}') - self.logger.log('Highest display resolution: %ux%u' % (max_hdisplay, max_vdisplay)) + self.logger.log(f'Highest display resolution: {max_hdisplay}x{max_vdisplay}') for master_pipe in pipes: req = kmstest.AtomicRequest(self) @@ -97,13 +97,13 @@ class RoutingTest(kmstest.KMSTest): 'CRTC_H': mode.vdisplay, }) - route.append('CRTC %u to connector %s' % (pipe.crtc.id, pipe.connector.fullname)) + route.append(f'CRTC {pipe.crtc.id} to connector {pipe.connector.fullname}') self.logger.log('Routing ' + ', '.join(route)) ret = req.commit_sync(True) if ret < 0: - self.fail('atomic commit failed with %d' % ret) + self.fail(f'atomic commit failed with {ret}') return time.sleep(5) -- cgit v1.2.3