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
Commit de626f0
Browse filesBrowse the repository at this point in the historyBrowse files
gh-157144: Reject missing archive paths and unimportable names in discovery
Address review of unittest discovery inside archives:
* A path hook such as zipimport claims every path below its archive, so
a mistyped start directory there gave an empty suite. discover() now
raises ImportError unless a top level directory in an archive is the
archive itself or lists a module, and regrtest's findtests() lets
os.listdir() raise when the archive lists nothing.
* Leave out names which the archive's finder lists but cannot import,
such as extension modules in a zip file, instead of reporting them as
failed imports.
* Pass *kind* to _find_test_path() for archive entries only, so that
subclasses overriding it with the previous signature keep working for
file system discovery.
* Use pkgutil.get_importer() in _is_archive_dir(); it does not cache a
negative result, contrary to what the docstring said.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
0 commit comments