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.
ansible/test/units/utils
Matt Davis e813b0151c
fix coverage output from synthetic packages (#71727)
* 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
4 years ago
..
collection_loader fix coverage output from synthetic packages (#71727) 4 years ago
display reset logging to INFO (#70878) 4 years ago
__init__.py Cleanup combine_vars 9 years ago
test_cleanup_tmp_file.py Clean up unit test boilerplate. 4 years ago
test_context_objects.py Unit test cleanup. (#60315) 5 years ago
test_display.py Use libc wcwidth to calculate print width in display (#66214) 4 years ago
test_encrypt.py Updates for password hashing (#71120) 4 years ago
test_helpers.py Clean up unit test boilerplate. 4 years ago
test_isidentifier.py ansible.utils.vars.isidentifier improvements (#58278) 5 years ago
test_shlex.py Clean up unit test boilerplate. 4 years ago
test_unsafe_proxy.py Ensure that data within a tuple is marked as unsafe (#65918) 5 years ago
test_vars.py combine filter: fine list handling (option b) (#57894) 5 years ago
test_version.py Fix SemanticVersion comparison (#69395) 5 years ago