diff --git a/changelogs/fragments/ansible-test-connection-units-init.yml b/changelogs/fragments/ansible-test-connection-units-init.yml new file mode 100644 index 00000000000..674b1e4436c --- /dev/null +++ b/changelogs/fragments/ansible-test-connection-units-init.yml @@ -0,0 +1,4 @@ +bugfixes: + - >- + ansible-test - ensure the correct unit test target is given when the + ``__init__.py`` file is modified inside the connection plugins directory diff --git a/test/lib/ansible_test/_internal/classification.py b/test/lib/ansible_test/_internal/classification.py index 52385d1ed4b..ff44b804533 100644 --- a/test/lib/ansible_test/_internal/classification.py +++ b/test/lib/ansible_test/_internal/classification.py @@ -527,7 +527,7 @@ class PathMapper: 'integration': self.integration_all_target, 'windows-integration': self.integration_all_target, 'network-integration': self.integration_all_target, - 'units': units_dir, + 'units': os.path.join(units_dir, ''), } units_path = os.path.join(units_dir, 'test_%s.py' % name)