diff options
author | Matt Clay <matt@mystile.com> | 2023-11-02 00:37:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 00:37:08 +0100 |
commit | 18e8401edd5357d1d9995ab6b44d7ff8d1702957 (patch) | |
tree | c45b1fbcb32a85e7208f262a8a0cbb3f3037d6ac /test/lib/ansible_test | |
parent | pip - Add module in venv example (diff) | |
download | ansible-18e8401edd5357d1d9995ab6b44d7ff8d1702957.tar.xz ansible-18e8401edd5357d1d9995ab6b44d7ff8d1702957.zip |
Remove Python 2.x compat from unit tests (#82109)
Diffstat (limited to 'test/lib/ansible_test')
-rw-r--r-- | test/lib/ansible_test/_internal/classification/__init__.py | 5 | ||||
-rw-r--r-- | test/lib/ansible_test/_internal/commands/units/__init__.py | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/test/lib/ansible_test/_internal/classification/__init__.py b/test/lib/ansible_test/_internal/classification/__init__.py index deda27ee71..b51228495c 100644 --- a/test/lib/ansible_test/_internal/classification/__init__.py +++ b/test/lib/ansible_test/_internal/classification/__init__.py @@ -674,11 +674,6 @@ class PathMapper: # Early classification that needs to occur before common classification belongs here. - if path.startswith('test/units/compat/'): - return { - 'units': 'test/units/', - } - if dirname == '.azure-pipelines/commands': test_map = { 'cloud.sh': 'integration:cloud/', diff --git a/test/lib/ansible_test/_internal/commands/units/__init__.py b/test/lib/ansible_test/_internal/commands/units/__init__.py index 78dd849815..7656eebf5b 100644 --- a/test/lib/ansible_test/_internal/commands/units/__init__.py +++ b/test/lib/ansible_test/_internal/commands/units/__init__.py @@ -245,7 +245,7 @@ def command_units(args: UnitsConfig) -> None: # # NOTE: This only affects use of pytest-mock. # Collection unit tests may directly import mock, which will be provided by ansible-test when it installs requirements using pip. - # Although mock is available for ansible-core unit tests, they should import units.compat.mock instead. + # Although mock is available for ansible-core unit tests, they should import unittest.mock instead. if str_to_version(python.version) < (3, 8): config_name = 'legacy.ini' else: |