diff --git a/requirements.txt b/requirements.txt index 99995ce35..09cf067a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ pexpect>=4.5 +packaging python-daemon pyyaml six diff --git a/test/conftest.py b/test/conftest.py index 2ba0ae8e3..558dc24b3 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,7 +1,7 @@ import shutil from pathlib import Path -from distutils.version import LooseVersion +from packaging.version import Version import subprocess from ansible_runner import defaults @@ -60,7 +60,7 @@ def is_pre_ansible212(): .stdout.strip() .decode() ) - if LooseVersion(base_version) < LooseVersion("2.12"): + if Version(base_version) < Version("2.12"): return True except pkg_resources.DistributionNotFound: pass diff --git a/test/integration/test_display_callback.py b/test/integration/test_display_callback.py index f150fc3ad..5d05d71fc 100644 --- a/test/integration/test_display_callback.py +++ b/test/integration/test_display_callback.py @@ -197,6 +197,7 @@ def test_callback_plugin_task_args_leak(executor, playbook): # make sure playbook was successful, so all tasks were hit assert not events[-1]['event_data']['failures'], 'Unexpected playbook execution failure' + @pytest.mark.parametrize( "playbook", [