Fix pytest collection during test_host partial run (#78596)

Sometimes pytest errors out with an `ImportError` during its tests
collection stage when a Python package/directory containing the test
module does not have an `__init__.py` in it. This is being observed
under Python 3.9 and higher.

The patch provides a workaround for this problem but does not address
the root cause which is currently unknown.

Ref:
https://github.com/ansible/ansible/pull/78585#issuecomment-1220885431
(cherry picked from commit beb70daf14)
pull/78671/head
Sviatoslav Sydorenko 4 years ago committed by GitHub
parent 8acd498a57
commit 6e070b90ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Loading…
Cancel
Save