summaryrefslogtreecommitdiff
path: root/tests/kms-test-modes.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-modes.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-modes.py')
-rwxr-xr-xtests/kms-test-modes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/kms-test-modes.py b/tests/kms-test-modes.py
index 433bb0b..c478489 100755
--- a/tests/kms-test-modes.py
+++ b/tests/kms-test-modes.py
@@ -12,8 +12,8 @@ class ModesTest(kmstest.KMSTest):
self.logger.log('Page flip complete')
def test_mode(self, connector, crtc, mode):
- 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')
@@ -22,7 +22,7 @@ class ModesTest(kmstest.KMSTest):
# Perform the mode set
ret = self.atomic_crtc_mode_set(crtc, connector, mode, fb)
if ret < 0:
- raise RuntimeError('atomic mode set failed with %d' % ret)
+ raise RuntimeError(f'atomic mode set failed with {ret}')
self.logger.log('Atomic mode set complete')
self.run(4)
@@ -33,7 +33,7 @@ class ModesTest(kmstest.KMSTest):
def main(self):
for connector in self.output_connectors():
- self.start('modes on connector %s' % connector.fullname)
+ self.start(f'modes on connector {connector.fullname}')
# Skip disconnected connectors
if not connector.connected():