From 835bc0eef26ec28de81b467abb39d1ea2f3885a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Boya=20Garc=C3=ADa?= Date: Fri, 29 Nov 2024 21:10:32 +0100 Subject: [PATCH] validate.py: Fix warning about wrong escape There were a couple strings containing \(. That is not a valid escape sequence in Python. The escape sequence was meant for GStreamer, and as such either the backslash should be doubled or a raw string must be used. This patch uses the latter for readability. Python 3.13 will print a warning when a invalid escape sequence in a string is found. As a drive-by fix, this patch fixes fixes whitespace issues in the file to make the Python linter happy. Part-of: --- .../gst-integration-testsuites/testsuites/validate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-integration-testsuites/testsuites/validate.py b/subprojects/gst-integration-testsuites/testsuites/validate.py index bb5327d97f..92c0946d96 100644 --- a/subprojects/gst-integration-testsuites/testsuites/validate.py +++ b/subprojects/gst-integration-testsuites/testsuites/validate.py @@ -65,6 +65,7 @@ BLACKLIST = [('validate.file.transcode.to_vorbis_and_vp8_in_webm.GH1_00094_1920x 'Racy with CI. No frames decoded before the end of the stream.'), ] + def add_accurate_seek_tests(test_manager, media_dir, extra_data): accurate_seeks_media_infos = [] for f in [ @@ -79,7 +80,7 @@ def add_accurate_seek_tests(test_manager, media_dir, extra_data): 'mp4/timecoded_h264_23976fps.mp4.media_info.skipped', 'mp4/timecoded_h264_2997fps.mp4.media_info.skipped', 'mp4/timecoded_h264_30fps.mp4.media_info.skipped', - ]: + ]: dirname = os.path.join(media_dir, "defaults", os.path.dirname(f)) filename = os.path.basename(f) media_info = os.path.join(dirname, filename) @@ -152,8 +153,8 @@ def setup_tests(test_manager, options): "sources": ("videotestsrc pattern=snow timestamp-offset=3000000000 ! 'video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1' ! timeoverlay", # noqa "videotestsrc pattern=smpte ! 'video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1' ! timeoverlay")}, # noqa - "bgra": ("videotestsrc ! video/x-raw, framerate=\(fraction\)10/1, width=100, height=100", # noqa - "videotestsrc ! video/x-raw, framerate=\(fraction\)5/1, width=320, height=240") + "bgra": (r"videotestsrc ! video/x-raw, framerate=\(fraction\)10/1, width=100, height=100", # noqa + r"videotestsrc ! video/x-raw, framerate=\(fraction\)5/1, width=320, height=240") }, valid_scenarios=valid_mixing_scenarios))