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
Matt Davis 07a9de1247
fix coverage output from synthetic packages (#71727) (#71748)
* 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 e813b0151c)
4 years ago
..
_vendor transparent downstream vendoring (#69850) 5 years ago
ansible_test Add Azure Pipelines support to ansible-test. 5 years ago
cli [stable-2.10] Update ansible doc formats (#71070) (#71111) 4 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
config [stable-2.10] Clean up unit test boilerplate. 4 years ago
errors Remove empty overridden unittest.setUp and unittest.tearDown methods. 5 years ago
executor fix internal cases of actions calling unqualified module names (#70818) (#70840) 4 years ago
galaxy [2.10] Improve ansible-galaxy STDOUT messages for collections (#70379) 4 years ago
inventory [stable-2.10] Clean up unit test boilerplate. 4 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 10 years ago
mock [stable-2.10] Clean up unit test boilerplate. 4 years ago
module_utils Attempt at reverting CVE-2020-1736 changes [2.10] (#71514) 4 years ago
modules [stable-2.10] Clean up unit test boilerplate. 4 years ago
parsing [stable-2.10] Ensure single vaulted values aren't counted as sequences. Fixes #70784 (#70786) (#70791) 4 years ago
playbook [stable-2.10] Clean up unit test boilerplate. 4 years ago
plugins powershell - fix nested CLIXML parser (#71412) (#71451) 4 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Do not treat AnsibleUndefined as being unsafe (#65202) 5 years ago
utils fix coverage output from synthetic packages (#71727) (#71748) 4 years ago
vars Remove empty setUp/tearDown/tearDownClass methods in test classes. 5 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
requirements.txt Remove unnecessary unit test requirements. 5 years ago
test_constants.py [stable-2.10] Clean up unit test boilerplate. 4 years ago
test_context.py [stable-2.10] Clean up unit test boilerplate. 4 years ago