##### SUMMARY

Support collection roles as integration test targets.

Now that https://github.com/ansible/ansible/issues/59462 has been merged, ansible-test can be updated to support running integration test targets that are collection roles.

The planned convention is to look for targets under `roles/test/` and allow use of target-specific plugins from `plugins/{plugin_type}/test/{target_name}/`.

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

##### ADDITIONAL INFORMATION

This will allow integration test targets to be written using collections instead of pre-collection roles.
"""Execute unit tests using pytest."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import sys
from ..util import (
    ANSIBLE_TEST_DATA_ROOT,
    display,
    get_available_python_versions,
    is_subdir,
    SubprocessError,
    REMOTE_ONLY_PYTHON_VERSIONS,
)
from ..util_common import (
    intercept_command,
    ResultType,
)
from ..ansible_util import (
    ansible_environment,
    check_pyyaml,
)
from ..target import (
    walk_internal_targets,
    walk_units_targets,
)
from ..config import (
    UnitsConfig,
)
from ..coverage_util import (
    coverage_context,