diff options
author | Matt Clay <matt@mystile.com> | 2020-06-22 22:27:08 +0200 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2020-06-22 23:20:33 +0200 |
commit | 98a0995fd073e506214b394ed36f03878484cf1e (patch) | |
tree | 8feecc41421f5391d88cbe1c56cd3dd5dda7b746 /test/units/utils | |
parent | adds japanese translation as a version-switcher option (#70214) (diff) | |
download | ansible-98a0995fd073e506214b394ed36f03878484cf1e.tar.xz ansible-98a0995fd073e506214b394ed36f03878484cf1e.zip |
Clean up unit test boilerplate.
Diffstat (limited to 'test/units/utils')
6 files changed, 16 insertions, 1 deletions
diff --git a/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/action/my_action.py b/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/action/my_action.py index 5b19fa1a50..9d30580f65 100644 --- a/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/action/my_action.py +++ b/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/action/my_action.py @@ -1,3 +1,6 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from ..module_utils.my_util import question diff --git a/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/module_utils/my_other_util.py b/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/module_utils/my_other_util.py index 6b194179aa..35e1381b53 100644 --- a/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/module_utils/my_other_util.py +++ b/test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/module_utils/my_other_util.py @@ -1 +1,4 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from .my_util import question diff --git a/test/units/utils/test_cleanup_tmp_file.py b/test/units/utils/test_cleanup_tmp_file.py index 5bc3900a55..2a44a55b15 100644 --- a/test/units/utils/test_cleanup_tmp_file.py +++ b/test/units/utils/test_cleanup_tmp_file.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division) +from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os diff --git a/test/units/utils/test_encrypt.py b/test/units/utils/test_encrypt.py index 91fbf34994..2cbe828a60 100644 --- a/test/units/utils/test_encrypt.py +++ b/test/units/utils/test_encrypt.py @@ -15,6 +15,9 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import sys import pytest diff --git a/test/units/utils/test_helpers.py b/test/units/utils/test_helpers.py index be781f058a..ec37b39bd0 100644 --- a/test/units/utils/test_helpers.py +++ b/test/units/utils/test_helpers.py @@ -15,6 +15,9 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import unittest from ansible.utils.helpers import pct_to_int diff --git a/test/units/utils/test_shlex.py b/test/units/utils/test_shlex.py index 54a253a3b1..e13d302d0d 100644 --- a/test/units/utils/test_shlex.py +++ b/test/units/utils/test_shlex.py @@ -15,6 +15,9 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import unittest from ansible.utils.shlex import shlex_split |