From f4cc3b79980c4d9b5a4485f38e354b62811dd52c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 10 Jun 2022 01:14:59 +0300 Subject: 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 Reviewed-by: Kieran Bingham --- tests/kms-test-planeposition.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tests/kms-test-planeposition.py') 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) -- cgit v1.2.3