summaryrefslogtreecommitdiff
path: root/tests/kms-test-formats.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-10 02:04:30 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-29 21:08:20 +0300
commitdcbc93a117b0efaa0e42fa6359eed4a71a9ca341 (patch)
tree379be9c16ed92d03574023282dec7347ce4f0792 /tests/kms-test-formats.py
parentf4cc3b79980c4d9b5a4485f38e354b62811dd52c (diff)
tests: Convert to formatted string literals
Use formatted string literals to replace legacy printf-style string formatting. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'tests/kms-test-formats.py')
-rwxr-xr-xtests/kms-test-formats.py10
1 files changed, 5 insertions, 5 deletions
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()