ansible-test and testing locally before commit

Getting error running ansible-test against the existing modules in either community.aws or amazon.aws:

ansible-test sanity --test yamllint route53_zone.py
ERROR: Target pattern not matched: route53_zone.py

any idea why ?

Is there an Ansible how to document to setup local test environment like using pre-commit, black, flake8 to automate the test procedure locally before push or commit ?

Thanks

You need to use the path to that file, not just the basename. If you install the python argcomplete package, you can tab complete the targets in ansible-test