Skip to content

gh-161617: Fix test_clinic, test_tools, test_generated_cases with lazy imports - #161618

Open
sobolevn wants to merge 3 commits into
python:mainfrom
sobolevn:issue-161617
Open

sobolevn wants to merge 3 commits into
python:mainfrom
sobolevn:issue-161617

Conversation

@sobolevn

@sobolevn sobolevn commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Looks like that my change to imports_under_tool also fixed other tests.
So, I removed them from the ignore as well.

Comment thread Lib/test/support/import_helper.py Resolved
@@ -32,7 +32,7 @@ def skip_if_missing(tool=None):
@contextlib.contextmanager
def imports_under_tool(name, *subdirs):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, does it not make sense to do it here instead?

@sobolevn sobolevn Nov 8, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, it might be required for other places that use DirsOnSysPath as well, since it is a broader API. We can alternatevly make a separate API called with forced_eager_imports(): and use it here. WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it is a better and more compsable API :)

@sobolevn

sobolevn commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

I also need this new context manager in #161660 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants