summaryrefslogtreecommitdiff
path: root/tests/kms-test-planeposition.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/kms-test-planeposition.py')
-rwxr-xr-xtests/kms-test-planeposition.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/kms-test-planeposition.py b/tests/kms-test-planeposition.py
index e843ae1..aceb849 100755
--- a/tests/kms-test-planeposition.py
+++ b/tests/kms-test-planeposition.py
@@ -42,8 +42,8 @@ class PlanePositionTest(kmstest.KMSTest):
self.skip('no CRTC available with connector and at least two planes')
return
- 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')
@@ -52,7 +52,7 @@ class PlanePositionTest(kmstest.KMSTest):
# Set the mode with no plane, wait 5s for the monitor to wake up
ret = self.atomic_crtc_mode_set(crtc, connector, mode, sync=True)
if ret < 0:
- self.fail('atomic mode set failed with %d' % ret)
+ self.fail(f'atomic mode set failed with {ret}')
return
self.logger.log('Initial atomic mode set completed')
@@ -63,7 +63,7 @@ class PlanePositionTest(kmstest.KMSTest):
destination = kmstest.Rect(0, 0, fb.width // 2, fb.height)
ret = self.atomic_plane_set(planes[0], crtc, source, destination, fb, sync=True)
if ret < 0:
- self.fail('atomic plane set for first plane failed with %d' % ret)
+ self.fail(f'atomic plane set for first plane failed with {ret}')
return
self.logger.log('Root plane enabled')
@@ -79,10 +79,10 @@ class PlanePositionTest(kmstest.KMSTest):
ret = self.atomic_plane_set(planes[1], crtc, source, destination, fb, sync=True)
if ret < 0:
- self.fail('atomic plane set with offset %d,%d' % offset)
+ self.fail(f'atomic plane set with offset {offset}')
return
- self.logger.log('Moved overlay plane to %d,%d' % offset)
+ self.logger.log(f'Moved overlay plane to {offset}')
time.sleep(3)
# Try to move the plane completely off-screen. The device is expected
@@ -97,10 +97,10 @@ class PlanePositionTest(kmstest.KMSTest):
ret = self.atomic_plane_set(planes[1], crtc, source, destination, fb, sync=True)
if ret < 0:
- self.fail('atomic plane set with offset %d,%d' % offset)
+ self.fail(f'atomic plane set with offset {offset}')
return
- self.logger.log('Moved overlay plane to %d,%d' % offset)
+ self.logger.log(f'Moved overlay plane to {offset}')
time.sleep(3)
# Disable and re-enable the plane when it is off-screen. The device is