Skip to content

bpo-29642: Load tests from implicit packages. #282

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

Conversation

andreif
Copy link

@andreif andreif commented Feb 24, 2017

unittest.TestLoader searches for tests only in packages containing __init__.py, although the docs mention that implicit namespace packages (PEP 420) are supported. This PR removes the checks for presence of __init__.py and therefore enables loading tests from namespace packages.

See http://bugs.python.org/issue29642

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:

  1. If you don't have an account on b.p.o, please create one
  2. Make sure your GitHub username is listed in "Your Details" at b.p.o
  3. If you have not already done so, please sign the PSF contributor agreement. The "bugs.python.org username " requested by the form is the "Login name" field under "Your Details".
  4. If you just signed the CLA, please wait at least one US business day and then check "Your Details" on bugs.python.org to see if your account has been marked as having signed the CLA (the delay is due to a person having to manually check your signed CLA)
  5. Reply here saying you have completed the above steps

Thanks again to your contribution and we look forward to looking at it!

@andreif
Copy link
Author

andreif commented Feb 24, 2017

@the-knights-who-say-ni I have completed the above steps.

Implicit PEP-420-style packages (i.e. missing __init__.py) were omitted,
and this commit enables searching for tests in them.
@andreif andreif force-pushed the fix/unittest-loading-from-implicit-packages branch from e7322f4 to 1eb074a Compare February 25, 2017 07:28
@andreif
Copy link
Author

andreif commented Mar 23, 2017

I was wrong and it's now outside of my use cases. It can be closed now.

akruis pushed a commit to akruis/cpython that referenced this pull request Jul 1, 2021
Decouple the cleanup logic for initial stubs of sub-interpreters from
the stack handling. Previously this logic depended on the value of
SLP_CSTACK_GOODGAP being positive.
akruis added a commit to akruis/cpython that referenced this pull request Jul 9, 2021
Decouple the cleanup logic for initial stubs of sub-interpreters from
the stack handling. Previously this logic depended on the value of
SLP_CSTACK_GOODGAP being positive.
jaraco pushed a commit that referenced this pull request Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants