From b17e1e5668f677e821dc541da44412d736c23f0a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Apr 2026 19:34:09 +0000 Subject: [PATCH] Add explanatory comment for fake STR_FORMAT_RE_TMPL key group in tests Agent-Logs-Url: https://github.com/alexta69/metube/sessions/0ae5ff34-540f-4fc8-a81c-358fb92b7c15 Co-authored-by: alexta69 <7450369+alexta69@users.noreply.github.com> --- app/tests/test_ytdl_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/tests/test_ytdl_utils.py b/app/tests/test_ytdl_utils.py index 06d6d50..a577339 100644 --- a/app/tests/test_ytdl_utils.py +++ b/app/tests/test_ytdl_utils.py @@ -24,6 +24,9 @@ class _ImpersonateTarget: fake_impersonate.ImpersonateTarget = _ImpersonateTarget fake_networking.impersonate = fake_impersonate +# The inner ``key`` group mirrors the real ``STR_FORMAT_RE_TMPL`` so that +# ``_OUTTMPL_FIELD_RE`` (compiled at import time) has the named group that +# ``_resolve_outtmpl_fields`` reads via ``match.group('key')``. fake_utils.STR_FORMAT_RE_TMPL = r"(?P)%\((?P(?P{}))\)(?P[-0-9.]*{})" fake_utils.STR_FORMAT_TYPES = "diouxXeEfFgGcrsa" fake_yt_dlp.networking = fake_networking