From 2b70bb1da3e76e6ad25ebe29ad48e24129a210de Mon Sep 17 00:00:00 2001 From: Jason Hoku Date: Wed, 4 Nov 2026 00:48:02 -0800 Subject: [PATCH] test(seedvr2): helper extraction stops at the next top-level def, decorator or comment Co-Authored-By: Claude Fable 5.1 --- tests/test_seedvr2_inline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_seedvr2_inline.py b/tests/test_seedvr2_inline.py index 8735748..0843768 100644 --- a/tests/test_seedvr2_inline.py +++ b/tests/test_seedvr2_inline.py @@ -15,7 +15,7 @@ sys.path.insert(0, _ROOT) def _load_helper(): src = open(os.path.join(_ROOT, "image_generation.py"), encoding="utf-8").read() - m = re.search(r"^def pil_to_image_array\(.*?(?=^def )", src, re.S | re.M) + m = re.search(r"^def pil_to_image_array\(.*?(?=^(?:def |@|#))", src, re.S | re.M) # stop at the next top-level def/decorator/comment ns = {} exec(m.group(0), ns) return ns["pil_to_image_array"]