From b31f4e2feaddb15b3ac6a945033f3f3d473576b7 Mon Sep 17 00:00:00 2001 From: TonyBlu Date: Mon, 25 May 2026 21:27:10 +0800 Subject: [PATCH] fix(tests): update subtitle language list assertions for variant fallback Update test expectations to match the new _subtitle_lang_list() output which includes regional variants (e.g. fr-FR, en-GB) for better subtitle matching. --- app/tests/test_dl_formats.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/tests/test_dl_formats.py b/app/tests/test_dl_formats.py index f1fbf48..01af602 100644 --- a/app/tests/test_dl_formats.py +++ b/app/tests/test_dl_formats.py @@ -92,7 +92,7 @@ class DlFormatsTests(unittest.TestCase): ) self.assertTrue(opts.get("writesubtitles")) self.assertFalse(opts.get("writeautomaticsub")) - self.assertEqual(opts["subtitleslangs"], ["fr"]) + self.assertEqual(opts["subtitleslangs"], ["fr", "fr-FR", "fr-CA", "fr-BE", "fr-CH"]) def test_get_opts_captions_auto_only(self): opts = get_opts( @@ -100,7 +100,7 @@ class DlFormatsTests(unittest.TestCase): ) self.assertFalse(opts.get("writesubtitles")) self.assertTrue(opts.get("writeautomaticsub")) - self.assertEqual(opts["subtitleslangs"], ["de-orig", "de"]) + self.assertEqual(opts["subtitleslangs"], ["de", "de-DE", "de-AT", "de-CH", "de-orig"]) def test_get_opts_captions_prefer_auto(self): opts = get_opts( @@ -108,7 +108,7 @@ class DlFormatsTests(unittest.TestCase): ) self.assertTrue(opts.get("writesubtitles")) self.assertTrue(opts.get("writeautomaticsub")) - self.assertEqual(opts["subtitleslangs"], ["es-orig", "es"]) + self.assertEqual(opts["subtitleslangs"], ["es", "es-ES", "es-MX", "es-AR", "es-CO", "es-CL", "es-PE", "es-VE", "es-orig"]) def test_get_opts_captions_prefer_manual_default_branch(self): opts = get_opts(