mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Move the arguments module into cli/ and context_objects into utils
* Note: Python2 is not as intelligent at detecting false import loops as Python3. context_objects.py cannot be added to cli/arguments because it would set up an import loop between cli/__init__.py, cli/arguments/context_objects.py, and context.py on Python2. ci_complete
This commit is contained in:
19
test/units/cli/arguments/test_optparse_helpers.py
Normal file
19
test/units/cli/arguments/test_optparse_helpers.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright: (c) 2018, Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division)
|
||||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible.cli.arguments import optparse_helpers as opt_help
|
||||
|
||||
|
||||
class TestOptparseHelpersVersion:
|
||||
|
||||
def test_version(self):
|
||||
ver = opt_help.version('ansible-cli-test')
|
||||
assert 'ansible-cli-test' in ver
|
||||
assert 'python version' in ver
|
||||
@@ -27,13 +27,13 @@ import tempfile
|
||||
import yaml
|
||||
|
||||
from ansible import context
|
||||
from ansible.arguments import context_objects as co
|
||||
from ansible.arguments import optparse_helpers as opt_help
|
||||
from ansible.cli.arguments import optparse_helpers as opt_help
|
||||
from ansible.cli.galaxy import GalaxyCLI
|
||||
from units.compat import unittest
|
||||
from units.compat.mock import call, patch
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.utils import context_objects as co
|
||||
from units.compat import unittest
|
||||
from units.compat.mock import call, patch
|
||||
|
||||
|
||||
class TestGalaxy(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user