Message227250
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
cd demo
cat <<EOF > tests/__init__.py
import sys
import os
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 |
|
Date |
User |
Action |
Args |
2014-09-22 03:47:54 | rbcollins | set | recipients:
+ rbcollins |
2014-09-22 03:47:54 | rbcollins | set | messageid: <1411357674.43.0.0204872118136.issue22457@psf.upfronthosting.co.za> |
2014-09-22 03:47:54 | rbcollins | link | issue22457 messages |
2014-09-22 03:47:53 | rbcollins | create | |
|