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-formats.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/kms-test-formats.py') diff --git a/tests/kms-test-formats.py b/tests/kms-test-formats.py index ce84943..5c3bfd4 100755 --- a/tests/kms-test-formats.py +++ b/tests/kms-test-formats.py @@ -37,8 +37,8 @@ class FormatsTest(kmstest.KMSTest): self.skip('no CRTC available with connector') return - self.logger.log('Testing connector %s, CRTC %u, mode %s' % \ - (connector.fullname, crtc.id, mode.name)) + self.logger.log(f'Testing connector {connector.fullname}, ' + f'CRTC {crtc.id}, mode {mode.name}') failed = 0 @@ -46,7 +46,7 @@ class FormatsTest(kmstest.KMSTest): for i in range(num_formats): format = crtc.primary_plane.formats[i] - self.logger.log('Testing format %s' % format) + self.logger.log(f'Testing format {format}') self.progress(i+1, num_formats) # Create a frame buffer @@ -62,7 +62,7 @@ class FormatsTest(kmstest.KMSTest): # Set the mode with a primary plane ret = self.atomic_crtc_mode_set(crtc, connector, mode, fb) if ret < 0: - self.logger.log('atomic mode set failed with %d' % ret) + self.logger.log(f'atomic mode set failed with {ret}') failed += 1 continue @@ -71,7 +71,7 @@ class FormatsTest(kmstest.KMSTest): self.atomic_crtc_disable(crtc) if failed: - self.fail('%s/%s formats failed' % (failed, num_formats)) + self.fail(f'{failed}/{num_formats} formats failed') else: self.success() -- cgit v1.2.3