Skip to content

Tests: only get __init__.py tests from test directories #5135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

beauxq
Copy link
Collaborator

@beauxq beauxq commented Jun 23, 2025

What is this fixing or adding?

#4969 is causing an issue in a world with side effects from importing an __init__.py
(It's better if there are no side effects from importing anything, but that's a more difficult problem to solve.)

This only only looks for tests in __init__.py if some parent directory is test*

How was this tested?

I put an assert False test in test/hosting/__init__.py to make sure it failed in pytest.

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jun 23, 2025
@qwint qwint added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jun 24, 2025
Copy link
Contributor

@silasary silasary left a comment

Choose a reason for hiding this comment

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

Seems reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants