if __name__ does work with ansible modules
This commit is contained in:
parent
f475769d3a
commit
885b60f31f
2 changed files with 1 additions and 4 deletions
|
@ -568,6 +568,5 @@ def main():
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
|
||||||
# FIXME: if __name__ == "__main__": ?
|
if __name__ == "__main__":
|
||||||
if "ANSIBLE_IN_HAPPY_UNITTEST_LAND" not in os.environ:
|
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -3,8 +3,6 @@ import mock
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
# FIXME: this is not super elegant
|
|
||||||
os.environ["ANSIBLE_IN_HAPPY_UNITTEST_LAND"] = "1"
|
|
||||||
from packaging.apt import (
|
from packaging.apt import (
|
||||||
expand_pkgspec_from_fnmatches,
|
expand_pkgspec_from_fnmatches,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue