diff --git a/changelogs/fragments/ansible-test-pytest-forked.yml b/changelogs/fragments/ansible-test-pytest-forked.yml new file mode 100644 index 00000000000..a8a58ce0a1c --- /dev/null +++ b/changelogs/fragments/ansible-test-pytest-forked.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - Update unit tests to use the ``--forked`` option instead of the deprecated ``--boxed`` option. diff --git a/test/lib/ansible_test/_data/requirements/units.txt b/test/lib/ansible_test/_data/requirements/units.txt index 307d7c353f7..5b4117a06cb 100644 --- a/test/lib/ansible_test/_data/requirements/units.txt +++ b/test/lib/ansible_test/_data/requirements/units.txt @@ -4,4 +4,5 @@ mock pytest pytest-mock pytest-xdist +pytest-forked pyyaml diff --git a/test/lib/ansible_test/_internal/units/__init__.py b/test/lib/ansible_test/_internal/units/__init__.py index 22145431117..d3f46382304 100644 --- a/test/lib/ansible_test/_internal/units/__init__.py +++ b/test/lib/ansible_test/_internal/units/__init__.py @@ -95,7 +95,7 @@ def command_units(args): cmd = [ 'pytest', - '--boxed', + '--forked', '-r', 'a', '-n', str(args.num_workers) if args.num_workers else 'auto', '--color',