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
load_tests not invoked in root __init__.py when start=package root #66647
Comments
python -m unittest discover -t . foo where foo is a package will not trigger load_tests in foo/init.py. To reproduce: mkdir -p demo/tests def load_tests(loader, tests, pattern):
print("HI WE ARE LOADING!")
this_dir = os.path.dirname(__file__)
tests.addTest(loader.discover(start_dir=this_dir, pattern=pattern))
return tests
EOF python -m unittest discover -t . tests |
This should fix this issue :) |
Updated patch - fixes windows tests for this patch. |
Updated patch. |
Updated patch, after other recent conflicting changes. |
(Pinging for reviews - I'm going to time out and land this early next week if I can't get a review on it, since this is actually a fairly significant oversight and I don't want unittest2 to run ahead of the stdlib - that way leads unmaintainable madness). |
With one minor doc change (break up the really long sentence), this looks good to go to me. |
New changeset ce0dd5e4b801 by Robert Collins in branch 'default': |
New changeset 2aac2d76035e by Robert Collins in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: