Fix @contextmanager leak on exception. (#21031)

* Fix @contextmanager leak on exception.
* Fix test leaks of global module args cache.
This commit is contained in:
Matt Clay 2017-02-03 17:19:59 -08:00 committed by GitHub
parent bb9ee0cf6f
commit 272ff10fa1
4 changed files with 25 additions and 13 deletions

View file

@ -40,6 +40,7 @@ class TestModuleUtilsBasic(unittest.TestCase):
from ansible.module_utils import basic
# test basic log invocation
basic._ANSIBLE_ARGS = None
am = basic.AnsibleModule(
argument_spec=dict(
foo = dict(default=True, type='bool'),