mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
07a9de1247
* fix coverage output from synthetic packages
* synthetic packages (eg, implicit collection packages without `__init__.py`) were always created at runtime with empty string source, which was compiled to a code object and exec'd during the package load. When run with code coverage, it created a bogus coverage entry (since the `__synthetic__`-suffixed `__file__` entry didn't exist on disk).
* modified collection loader `get_code` to preserve the distinction between `None` (eg synthetic package) and empty string (eg empty `__init__.py`) values from `get_source`, and to return `None` when the source is `None`. This allows the package loader to skip `exec`ing things that truly have no source file on disk, thus not creating bogus coverage entries, while preserving behavior and coverage reporting for empty package inits that actually exist.
* add unit test
(cherry picked from commit
|
4 years ago | |
---|---|---|
.. | ||
_vendor | 5 years ago | |
ansible_test | 5 years ago | |
cli | 4 years ago | |
compat | 6 years ago | |
config | 4 years ago | |
errors | 5 years ago | |
executor | 4 years ago | |
galaxy | 4 years ago | |
inventory | 4 years ago | |
inventory_test_data/group_vars | 10 years ago | |
mock | 4 years ago | |
module_utils | 4 years ago | |
modules | 4 years ago | |
parsing | 4 years ago | |
playbook | 4 years ago | |
plugins | 4 years ago | |
regex | 6 years ago | |
template | 5 years ago | |
utils | 4 years ago | |
vars | 5 years ago | |
__init__.py | 8 years ago | |
requirements.txt | 5 years ago | |
test_constants.py | 4 years ago | |
test_context.py | 4 years ago |