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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8015>
This commit is contained in:
Alicia Boya García 2024-11-29 21:10:32 +01:00 committed by GStreamer Marge Bot
parent 9f81362d89
commit 835bc0eef2

View file

@ -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))