summaryrefslogtreecommitdiff
path: root/tests/kms-test-planeposition.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-10 01:14:59 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-29 21:08:18 +0300
commitf4cc3b79980c4d9b5a4485f38e354b62811dd52c (patch)
treeb955031c87719a7f46fc1269601dcd53751eff08 /tests/kms-test-planeposition.py
parent322821a1381f81c4dd480d065bec13803c7e69dc (diff)
tests: Replace double quotes with single quotes
The code base mixes single and double quotes. Standardize on single quotes except for triple-quoted strings (to match the PEP8 coding style) and where the string contains single quotes to avoid the need to escape them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'tests/kms-test-planeposition.py')
-rwxr-xr-xtests/kms-test-planeposition.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/kms-test-planeposition.py b/tests/kms-test-planeposition.py
index 0381896..e843ae1 100755
--- a/tests/kms-test-planeposition.py
+++ b/tests/kms-test-planeposition.py
@@ -10,12 +10,12 @@ class PlanePositionTest(kmstest.KMSTest):
"""Test boundaries of plane positioning."""
def main(self):
- self.start("plane positioning boundaries")
+ self.start('plane positioning boundaries')
# Find a CRTC with a connected connector and at least two planes
for connector in self.output_connectors():
if not connector.connected():
- self.skip("unconnected connector")
+ self.skip('unconnected connector')
continue
try:
@@ -39,23 +39,23 @@ class PlanePositionTest(kmstest.KMSTest):
break
else:
- self.skip("no CRTC available with connector and at least two planes")
+ 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" % \
+ self.logger.log('Testing connector %s, CRTC %u, mode %s with %u planes' % \
(connector.fullname, crtc.id, mode.name, len(planes)))
# Create a frame buffer
- fb = pykms.DumbFramebuffer(self.card, mode.hdisplay, mode.vdisplay, "XR24")
+ fb = pykms.DumbFramebuffer(self.card, mode.hdisplay, mode.vdisplay, 'XR24')
pykms.draw_test_pattern(fb)
# 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('atomic mode set failed with %d' % ret)
return
- self.logger.log("Initial atomic mode set completed")
+ self.logger.log('Initial atomic mode set completed')
time.sleep(5)
# Add the first plane to cover half of the CRTC
@@ -63,10 +63,10 @@ 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('atomic plane set for first plane failed with %d' % ret)
return
- self.logger.log("Root plane enabled")
+ self.logger.log('Root plane enabled')
time.sleep(3)
# Add the second plane and move it around to cross all CRTC boundaries
@@ -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('atomic plane set with offset %d,%d' % offset)
return
- self.logger.log("Moved overlay plane to %d,%d" % offset)
+ self.logger.log('Moved overlay plane to %d,%d' % offset)
time.sleep(3)
# Try to move the plane completely off-screen. The device is expected
@@ -97,17 +97,17 @@ 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('atomic plane set with offset %d,%d' % offset)
return
- self.logger.log("Moved overlay plane to %d,%d" % offset)
+ self.logger.log('Moved overlay plane to %d,%d' % offset)
time.sleep(3)
# Disable and re-enable the plane when it is off-screen. The device is
# still expected to handle this gracefully.
ret = self.atomic_plane_disable(planes[1])
if ret < 0:
- self.fail("off-screen atomic plane disable failed")
+ self.fail('off-screen atomic plane disable failed')
return
width = fb.width - 100
@@ -117,7 +117,7 @@ class PlanePositionTest(kmstest.KMSTest):
ret = self.atomic_plane_set(planes[1], crtc, source, destination, fb, sync=True)
if ret < 0:
- self.fail("off-scrren atomic plane enable failed")
+ self.fail('off-scrren atomic plane enable failed')
return
self.atomic_crtc_disable(crtc)