From 923f26fb8097752ece7d074934c5d34787ff4dfb Mon Sep 17 00:00:00 2001 From: hanse141 Date: Thu, 11 Dec 2025 14:39:10 -0500 Subject: [PATCH] Import Hotfix --- src/inline/plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/inline/plugin.py b/src/inline/plugin.py index f2e3189..90ac731 100644 --- a/src/inline/plugin.py +++ b/src/inline/plugin.py @@ -1170,7 +1170,9 @@ def _find(self, tests, obj, module, globs, seen): ###################################################################### class InlineTestRunner: def run(self, test: InlineTest, out: List) -> None: - tree = ast.parse(test.to_test()) + test_str = test.write_imports() + test_str += test.to_test() + tree = ast.parse(test_str) codeobj = compile(tree, filename="", mode="exec") start_time = time.time() if test.timeout > 0: