You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError is raised only when python -m unittest discover is given #76021
Create a package pkg. Put test.py there. Write none = None in pkg/__init__.py.
In the directory containing pkg/, python [23] -m unittest pkg.test will terminate normally, but python [23] -m unittest discover pkg will raise ImportError. The phenomenon is the same in macOS Sierra, Debian 9.0, Windows 7. I do not think this is a very kind behavior.
Thank you.
Activity
Hirokih2Horiuchi commentedon Oct 22, 2017
Create a package
pkg. Puttest.pythere. Writenone = Noneinpkg/__init__.py.In the directory containing
pkg/,python [23] -m unittest pkg.testwill terminate normally, butpython [23] -m unittest discover pkgwill raiseImportError. The phenomenon is the same in macOS Sierra, Debian 9.0, Windows 7. I do not think this is a very kind behavior.Thank you.
serhiy-storchaka commentedon Oct 22, 2017
Run
By default the top level directory is the same as the start directory (i.e. pkg).