Skip to content

Instantly share code, notes, and snippets.

@major
Created June 24, 2022 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save major/f7d0de0786f3795056cb030edb4a69cf to your computer and use it in GitHub Desktop.
Save major/f7d0de0786f3795056cb030edb4a69cf to your computer and use it in GitHub Desktop.
azure-cli-core test output on 3.11.0b3
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 '
+ PATH=/builddir/build/BUILDROOT/azure-cli-2.37.0-1.fc37.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
+ PYTHONPATH=/builddir/build/BUILDROOT/azure-cli-2.37.0-1.fc37.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/azure-cli-2.37.0-1.fc37.noarch/usr/lib/python3.11/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/.pyproject-builddir'
+ /usr/bin/pytest -n auto src/azure-cli-core
============================= test session starts ==============================
platform linux -- Python 3.11.0b3, pytest-7.1.2, pluggy-1.0.0
rootdir: /builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core
plugins: forked-1.4.0, xdist-2.5.0
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I
gw0 [329] / gw1 [329] / gw2 [329] / gw3 [329] / gw4 [329] / gw5 [329]
..........................F............................................. [ 21%]
............s........FF..............................................FF. [ 43%]
......F...................................FFF.FF................F...F... [ 65%]
....F.........................F..................F...................... [ 87%]
......................................... [100%]
=================================== FAILURES ===================================
________________ TestClientFactory.test_get_mgmt_service_client ________________
[gw1] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.commands.tests.test_client_factory.TestClientFactory testMethod=test_get_mgmt_service_client>
def test_get_mgmt_service_client(self):
cli = DummyCli()
> client = get_mgmt_service_client(cli, ResourceType.MGMT_RESOURCE_RESOURCES)
src/azure-cli-core/azure/cli/core/commands/tests/test_client_factory.py:62:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/commands/client_factory.py:70: in get_mgmt_service_client
client, _ = _get_mgmt_service_client(cli_ctx, client_type, subscription_id=subscription_id,
src/azure-cli-core/azure/cli/core/commands/client_factory.py:212: in _get_mgmt_service_client
cred, subscription_id, _ = profile.get_login_credentials(subscription_id=subscription_id, resource=resource,
src/azure-cli-core/azure/cli/core/_profile.py:314: in get_login_credentials
account = self.get_subscription(subscription_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <azure.cli.core._profile.Profile object at 0x7fd694c6bdd0>
subscription = None
def get_subscription(self, subscription=None): # take id or name
subscriptions = self.load_cached_subscriptions()
if not subscriptions:
> raise CLIError(_AZ_LOGIN_MESSAGE)
E knack.util.CLIError: Please run 'az login' to setup account.
src/azure-cli-core/azure/cli/core/_profile.py:546: CLIError
------------------------------ Captured log call -------------------------------
WARNING cli.azure.cli.core._session:_session.py:47 Failed to load or parse file /builddir/.azure/versionCheck.json. It will be overridden by default settings.
__________________ TestCommandRegistration.test_command_index __________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_command_registration.TestCommandRegistration testMethod=test_command_index>
@mock.patch('importlib.import_module', _mock_import_lib)
@mock.patch('pkgutil.iter_modules', _mock_iter_modules)
@mock.patch('azure.cli.core.commands._load_command_loader', _mock_load_command_loader)
@mock.patch('azure.cli.core.extension.get_extension_modname', _mock_get_extension_modname)
@mock.patch('azure.cli.core.extension.get_extensions', _mock_get_extensions)
def test_command_index(self):
from azure.cli.core._session import INDEX
from azure.cli.core import CommandIndex, __version__
cli = DummyCli()
loader = cli.commands_loader
command_index = CommandIndex(cli)
def _set_index(dict_):
INDEX[CommandIndex._COMMAND_INDEX] = dict_
def _check_index():
self.assertEqual(INDEX[CommandIndex._COMMAND_INDEX_VERSION], __version__)
self.assertEqual(INDEX[CommandIndex._COMMAND_INDEX_CLOUD_PROFILE], cli.cloud.profile)
self.assertDictEqual(INDEX[CommandIndex._COMMAND_INDEX], self.expected_command_index)
# Clear the command index
_set_index({})
self.assertFalse(INDEX[CommandIndex._COMMAND_INDEX])
loader.load_command_table(None)
# Test command index is built for None args
_check_index()
# Test command index is built when `args` is provided
_set_index({})
loader.load_command_table(["hello", "mod-only"])
_check_index()
# Test rebuild command index if no module found
_set_index({"network": ["azure.cli.command_modules.network"]})
loader.load_command_table(["hello", "mod-only"])
_check_index()
> with mock.patch("azure.cli.core.__version__", "2.7.0"), mock.patch.object(cli.cloud, "profile", "2019-03-01-hybrid"):
src/azure-cli-core/azure/cli/core/tests/test_command_registration.py:301:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.11/unittest/mock.py:1427: in __enter__
original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <unittest.mock._patch object at 0x7f921d624dd0>
def get_original(self):
target = self.getter()
name = self.attribute
original = DEFAULT
local = False
try:
original = target.__dict__[name]
except (AttributeError, KeyError):
original = getattr(target, name, DEFAULT)
else:
local = True
if name in _builtins and isinstance(target, ModuleType):
self.create = True
if not self.create and original is DEFAULT:
> raise AttributeError(
"%s does not have the attribute %r" % (target, name)
)
E AttributeError: <MagicMock id='140265534466128'> does not have the attribute '__version__'
/usr/lib64/python3.11/unittest/mock.py:1400: AttributeError
_____ TestCommandRegistration.test_command_index_always_loaded_extensions ______
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_command_registration.TestCommandRegistration testMethod=test_command_index_always_loaded_extensions>
@mock.patch('importlib.import_module', _mock_import_lib)
@mock.patch('pkgutil.iter_modules', _mock_iter_modules)
@mock.patch('azure.cli.core.commands._load_command_loader', _mock_load_command_loader)
@mock.patch('azure.cli.core.extension.get_extension_modname', _mock_get_extension_modname)
@mock.patch('azure.cli.core.extension.get_extensions', _mock_get_extensions)
def test_command_index_always_loaded_extensions(self):
from azure.cli.core import CommandIndex
cli = DummyCli()
loader = cli.commands_loader
index = CommandIndex()
index.invalidate()
# Test azext_always_loaded is loaded when command index is rebuilt
with mock.patch('azure.cli.core.ALWAYS_LOADED_EXTENSIONS', ['azext_always_loaded']):
loader.load_command_table(["hello", "mod-only"])
self.assertEqual(TestCommandRegistration.test_hook, "FAKE_HANDLER")
TestCommandRegistration.test_hook = []
# Test azext_always_loaded is loaded when command index is used
with mock.patch('azure.cli.core.ALWAYS_LOADED_EXTENSIONS', ['azext_always_loaded']):
loader.load_command_table(["hello", "mod-only"])
> self.assertEqual(TestCommandRegistration.test_hook, "FAKE_HANDLER")
E AssertionError: [] != 'FAKE_HANDLER'
src/azure-cli-core/azure/cli/core/tests/test_command_registration.py:415: AssertionError
______________ GenericUpdateTest.test_generic_update_empty_nodes _______________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_generic_update.GenericUpdateTest testMethod=test_generic_update_empty_nodes>
def test_generic_update_empty_nodes(self):
my_obj, loader_cls = _prepare_test_loader()
cli = DummyCli(commands_loader_cls=loader_cls)
# add to prop
cli.invoke('genupdate --add emptyProp a=b'.split())
> self.assertEqual(my_obj.empty_prop[0]['a'], 'b', 'verify object added to null list')
E TypeError: 'NoneType' object is not subscriptable
src/azure-cli-core/azure/cli/core/tests/test_generic_update.py:311: TypeError
----------------------------- Captured stderr call -----------------------------
To open an issue, please run: 'az feedback'
------------------------------ Captured log call -------------------------------
INFO az_command_data_logger:azlogging.py:128 command args: genupdate --add {} {}
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 The command failed with an unexpected error. Here is the traceback:
ERROR az_command_data_logger:azlogging.py:213 The command failed with an unexpected error. Here is the traceback:
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 argument _command_package: conflicting subparser: genupdate
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _command_package: conflicting subparser: genupdate
ERROR az_command_data_logger:azlogging.py:213 argument _command_package: conflicting subparser: genupdate
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _command_package: conflicting subparser: genupdate
INFO az_command_data_logger:azlogging.py:192 exit code: 1
_________________ GenericUpdateTest.test_generic_update_errors _________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_generic_update.GenericUpdateTest testMethod=test_generic_update_errors>
def test_generic_update_errors(self): # pylint: disable=no-self-use
my_obj, loader_cls = _prepare_test_loader()
cli = DummyCli(commands_loader_cls=loader_cls)
def _execute_with_error(command, error, message):
try:
cli.invocation = cli.invocation_cls(cli_ctx=cli, parser_cls=cli.parser_cls,
commands_loader_cls=cli.commands_loader_cls, help_cls=cli.help_cls)
cli.invocation.execute(command.split())
except CLIError as ex:
if error not in str(ex):
raise AssertionError('{}\nExpected: {}\nActual: {}'.format(message, error, ex))
return
except Exception as ex:
raise ex
raise AssertionError("exception not raised for '{0}'".format(message))
missing_remove_message = "Couldn't find 'doesntExist' in ''. Available options: ['additional1', 'additionalList', 'emptyDict', 'emptyDictOfDicts', 'emptyList', 'emptyProp', 'myDict', 'myList', 'myListOfCamelDicts', 'myListOfObjects', 'myListOfSnakeDicts', 'myProp', 'myTestObject']"
> _execute_with_error('genupdate --remove doesntExist',
missing_remove_message,
'remove non-existent property by name')
src/azure-cli-core/azure/cli/core/tests/test_generic_update.py:246:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/tests/test_generic_update.py:242: in _execute_with_error
raise ex
src/azure-cli-core/azure/cli/core/tests/test_generic_update.py:236: in _execute_with_error
cli.invocation.execute(command.split())
src/azure-cli-core/azure/cli/core/commands/__init__.py:565: in execute
self.parser.load_command_table(self.commands_loader)
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_command_package', nargs='A...', const=None, default=None, type=None, choices={'genupdate': 'genupdate'}, required=True, help=None, metavar=None)
name = 'genupdate'
kwargs = {'_command_source': None, 'cli_help': <azure.cli.core._help.AzCliHelp object at 0x7f921c3eaf50>, 'conflict_handler': '...ion_loader of <azure.cli.core.commands.command_operation.GenericUpdateCommandOperation object at 0x7f921d8f93d0>>, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _command_package: conflicting subparser: genupdate
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
------------------------------ Captured log call -------------------------------
INFO az_command_data_logger:azlogging.py:128 command args: genupdate --remove {}
________________ GenericUpdateTest.test_generic_update_scenario ________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_generic_update.GenericUpdateTest testMethod=test_generic_update_scenario>
def test_generic_update_scenario(self): # pylint: disable=too-many-statements
my_obj, loader_cls = _prepare_test_loader()
cli = DummyCli(commands_loader_cls=loader_cls)
# Test simplest ways of setting properties
cli.invoke('genupdate --set myProp=newValue'.split())
> self.assertEqual(my_obj.my_prop, 'newValue', 'set simple property')
E AssertionError: 'my_value' != 'newValue'
E - my_value
E + newValue
E : set simple property
src/azure-cli-core/azure/cli/core/tests/test_generic_update.py:118: AssertionError
----------------------------- Captured stderr call -----------------------------
To open an issue, please run: 'az feedback'
------------------------------ Captured log call -------------------------------
INFO az_command_data_logger:azlogging.py:128 command args: genupdate --set {}
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 The command failed with an unexpected error. Here is the traceback:
ERROR az_command_data_logger:azlogging.py:213 The command failed with an unexpected error. Here is the traceback:
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 argument _command_package: conflicting subparser: genupdate
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _command_package: conflicting subparser: genupdate
ERROR az_command_data_logger:azlogging.py:213 argument _command_package: conflicting subparser: genupdate
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _command_package: conflicting subparser: genupdate
INFO az_command_data_logger:azlogging.py:192 exit code: 1
________________ TestParser.test_case_insensitive_enum_choices _________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_parser.TestParser testMethod=test_case_insensitive_enum_choices>
def test_case_insensitive_enum_choices(self):
from enum import Enum
class TestEnum(Enum): # pylint: disable=too-few-public-methods
opt1 = "ALL_CAPS"
opt2 = "camelCase"
opt3 = "snake_case"
def test_handler():
pass
cli = DummyCli()
cli.loader = mock.MagicMock()
cli.loader.cli_ctx = cli
command = AzCliCommand(cli.loader, 'test command', test_handler)
command.add_argument('opt', '--opt', required=True, **enum_choice_list(TestEnum))
cmd_table = {'test command': command}
cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
> parser.load_command_table(cli.commands_loader)
src/azure-cli-core/azure/cli/core/tests/test_parser.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'command': 'command'}, required=True, help=None, metavar=None)
name = 'command'
kwargs = {'_command_source': None, 'cli_help': None, 'conflict_handler': 'error', 'description': None, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: command
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
_______________________ TestParser.test_nargs_parameter ________________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_parser.TestParser testMethod=test_nargs_parameter>
def test_nargs_parameter(self):
def test_handler():
pass
cli = DummyCli()
cli.loader = mock.MagicMock()
cli.loader.cli_ctx = cli
command = AzCliCommand(cli.loader, 'test command', test_handler)
command.add_argument('req', '--req', required=True, nargs=2)
cmd_table = {'test command': command}
cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
> parser.load_command_table(cli.commands_loader)
src/azure-cli-core/azure/cli/core/tests/test_parser.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'command': 'command'}, required=True, help=None, metavar=None)
name = 'command'
kwargs = {'_command_source': None, 'cli_help': None, 'conflict_handler': 'error', 'description': None, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: command
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
__________________ TestParser.test_parser_error_spellchecker ___________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_parser.TestParser testMethod=test_parser_error_spellchecker>
@mock.patch('importlib.import_module', _mock_import_lib)
@mock.patch('pkgutil.iter_modules', _mock_iter_modules)
@mock.patch('azure.cli.core.commands._load_command_loader', _mock_load_command_loader)
@mock.patch('azure.cli.core.extension.get_extension_modname', _mock_extension_modname)
@mock.patch('azure.cli.core.extension.get_extensions', _mock_get_extensions)
def test_parser_error_spellchecker(self):
cli = DummyCli()
main_loader = MainCommandsLoader(cli)
cli.loader = main_loader
cli.loader.load_command_table(None)
parser = cli.parser_cls(cli)
> parser.load_command_table(cli.loader)
src/azure-cli-core/azure/cli/core/tests/test_parser.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'module': 'module'}, required=True, help=None, metavar=None)
name = 'module'
kwargs = {'_command_source': 'azure.cli.core.tests.test_parser', 'cli_help': None, 'conflict_handler': 'error', 'description': None, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: module
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
___________________ TestParser.test_register_simple_commands ___________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_parser.TestParser testMethod=test_register_simple_commands>
def test_register_simple_commands(self):
def test_handler1():
pass
def test_handler2():
pass
cli = DummyCli()
cli.loader = mock.MagicMock()
cli.loader.cli_ctx = cli
command = AzCliCommand(cli.loader, 'command the-name', test_handler1)
command2 = AzCliCommand(cli.loader, 'sub-command the-second-name', test_handler2)
cmd_table = {'command the-name': command, 'sub-command the-second-name': command2}
cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
> parser.load_command_table(cli.commands_loader)
src/azure-cli-core/azure/cli/core/tests/test_parser.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'the-name': 'the-name'}, required=True, help=None, metavar=None)
name = 'the-name'
kwargs = {'_command_source': None, 'cli_help': None, 'conflict_handler': 'error', 'description': None, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: the-name
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
______________________ TestParser.test_required_parameter ______________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_parser.TestParser testMethod=test_required_parameter>
def test_required_parameter(self):
def test_handler(args): # pylint: disable=unused-argument
pass
cli = DummyCli()
cli.loader = mock.MagicMock()
cli.loader.cli_ctx = cli
command = AzCliCommand(cli.loader, 'test command', test_handler)
command.add_argument('req', '--req', required=True)
cmd_table = {'test command': command}
cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
> parser.load_command_table(cli.commands_loader)
src/azure-cli-core/azure/cli/core/tests/test_parser.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'command': 'command'}, required=True, help=None, metavar=None)
name = 'command'
kwargs = {'_command_source': None, 'cli_help': None, 'conflict_handler': 'error', 'description': None, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: command
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
___________________________ HelpTest.test_help_loads ___________________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_help.HelpTest testMethod=test_help_loads>
def test_help_loads(self):
from azure.cli.core.commands.arm import register_global_subscription_argument, register_ids_argument
import knack.events as events
parser_dict = {}
cli = DummyCli()
help_ctx = cli.help_cls(cli)
try:
cli.invoke(['-h'])
except SystemExit:
pass
cmd_tbl = cli.invocation.commands_loader.command_table
> cli.invocation.parser.load_command_table(cli.invocation.commands_loader)
src/azure-cli-core/azure/cli/core/tests/test_help.py:133:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'check-name': 'check-name'}, required=True, help=None, metavar=None)
name = 'check-name'
kwargs = {'_command_source': 'acr', 'cli_help': <azure.cli.core._help.AzCliHelp object at 0x7f921d580710>, 'conflict_handler': ...tion.description_loader of <azure.cli.core.commands.command_operation.CommandOperation object at 0x7f921d21e990>>, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: check-name
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
----------------------------- Captured stderr call -----------------------------
To open an issue, please run: 'az feedback'
------------------------------ Captured log call -------------------------------
INFO az_command_data_logger:azlogging.py:128 command args: -h
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 The command failed with an unexpected error. Here is the traceback:
ERROR az_command_data_logger:azlogging.py:213 The command failed with an unexpected error. Here is the traceback:
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 argument _subcommand: conflicting subparser: check-name
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _subcommand: conflicting subparser: check-name
ERROR az_command_data_logger:azlogging.py:213 argument _subcommand: conflicting subparser: check-name
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _subcommand: conflicting subparser: check-name
INFO az_command_data_logger:azlogging.py:192 exit code: 1
___________________________ TestHelpLoads.test_basic ___________________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_help.TestHelpLoads testMethod=test_basic>
mocked_load = <MagicMock name='_load_command_loader' id='140265411970256'>
mocked_pkg_util = <MagicMock name='iter_modules' id='140265411972240'>
@mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)])
@mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader)
def test_basic(self, mocked_load, mocked_pkg_util):
> with self.assertRaises(SystemExit):
E AssertionError: SystemExit not raised
src/azure-cli-core/azure/cli/core/tests/test_help.py:325: AssertionError
----------------------------- Captured stderr call -----------------------------
To open an issue, please run: 'az feedback'
------------------------------ Captured log call -------------------------------
INFO az_command_data_logger:azlogging.py:128 command args: test alpha -h
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 The command failed with an unexpected error. Here is the traceback:
ERROR az_command_data_logger:azlogging.py:213 The command failed with an unexpected error. Here is the traceback:
ERROR cli.azure.cli.core.azclierror:azlogging.py:212 argument _subcommand: conflicting subparser: alpha
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _subcommand: conflicting subparser: alpha
ERROR az_command_data_logger:azlogging.py:213 argument _subcommand: conflicting subparser: alpha
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 565, in execute
self.parser.load_command_table(self.commands_loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argparse.ArgumentError: argument _subcommand: conflicting subparser: alpha
INFO az_command_data_logger:azlogging.py:192 exit code: 1
____________________ TestHelpLoads.test_load_from_help_json ____________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_help.TestHelpLoads testMethod=test_load_from_help_json>
mocked_load = <MagicMock name='_load_command_loader' id='140265516169872'>
mocked_pkg_util = <MagicMock name='iter_modules' id='140265534262800'>
mocked_getmembers = <MagicMock name='getmembers' id='140265412058000'>
@mock.patch('inspect.getmembers', side_effect=mock_inspect_getmembers)
@mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)])
@mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader)
def test_load_from_help_json(self, mocked_load, mocked_pkg_util, mocked_getmembers):
# setup help.py, help.yaml and help.json
self.set_help_py()
path = self.set_help_yaml() # either (yaml or json) path should work. As both files are in the same temp dir.
self.set_help_json()
> create_invoker_and_load_cmds_and_args(self.test_cli)
src/azure-cli-core/azure/cli/core/tests/test_help.py:463:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/tests/test_help.py:107: in create_invoker_and_load_cmds_and_args
invoker.parser.load_command_table(invoker.commands_loader)
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'alpha': 'alpha'}, required=True, help=None, metavar=None)
name = 'alpha'
kwargs = {'_command_source': 'test_help_loaders', 'cli_help': <azure.cli.core._help.AzCliHelp object at 0x7f92160f6d10>, 'confl...tion.description_loader of <azure.cli.core.commands.command_operation.CommandOperation object at 0x7f92161c4d50>>, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: alpha
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
_____________________ TestHelpLoads.test_load_from_help_py _____________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_help.TestHelpLoads testMethod=test_load_from_help_py>
mocked_load = <MagicMock name='_load_command_loader' id='140265410047440'>
mocked_pkg_util = <MagicMock name='iter_modules' id='140265410363856'>
@mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)])
@mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader)
def test_load_from_help_py(self, mocked_load, mocked_pkg_util):
self.set_help_py()
> create_invoker_and_load_cmds_and_args(self.test_cli)
src/azure-cli-core/azure/cli/core/tests/test_help.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/tests/test_help.py:107: in create_invoker_and_load_cmds_and_args
invoker.parser.load_command_table(invoker.commands_loader)
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'alpha': 'alpha'}, required=True, help=None, metavar=None)
name = 'alpha'
kwargs = {'_command_source': 'test_help_loaders', 'cli_help': <azure.cli.core._help.AzCliHelp object at 0x7f9215f5b4d0>, 'confl...tion.description_loader of <azure.cli.core.commands.command_operation.CommandOperation object at 0x7f92165f2090>>, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: alpha
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
____________________ TestHelpLoads.test_load_from_help_yaml ____________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
self = <azure.cli.core.tests.test_help.TestHelpLoads testMethod=test_load_from_help_yaml>
mocked_load = <MagicMock name='_load_command_loader' id='140265414837072'>
mocked_pkg_util = <MagicMock name='iter_modules' id='140265414531920'>
@mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)])
@mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader)
def test_load_from_help_yaml(self, mocked_load, mocked_pkg_util):
# setup help.py and help.yaml help.
self.set_help_py()
yaml_path = self.set_help_yaml()
> create_invoker_and_load_cmds_and_args(self.test_cli)
src/azure-cli-core/azure/cli/core/tests/test_help.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-core/azure/cli/core/tests/test_help.py:107: in create_invoker_and_load_cmds_and_args
invoker.parser.load_command_table(invoker.commands_loader)
src/azure-cli-core/azure/cli/core/parser.py:100: in load_command_table
command_parser = subparser.add_parser(command_verb,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = _SubParsersAction(option_strings=[], dest='_subcommand', nargs='A...', const=None, default=None, type=None, choices={'alpha': 'alpha'}, required=True, help=None, metavar=None)
name = 'alpha'
kwargs = {'_command_source': 'test_help_loaders', 'cli_help': <azure.cli.core._help.AzCliHelp object at 0x7f9216350710>, 'confl...tion.description_loader of <azure.cli.core.commands.command_operation.CommandOperation object at 0x7f92164f6d10>>, ...}
aliases = ()
def add_parser(self, name, **kwargs):
# set prog from the existing prefix
if kwargs.get('prog') is None:
kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
aliases = kwargs.pop('aliases', ())
if name in self._name_parser_map:
> raise ArgumentError(self, _('conflicting subparser: %s') % name)
E argparse.ArgumentError: argument _subcommand: conflicting subparser: alpha
/usr/lib64/python3.11/argparse.py:1185: ArgumentError
=============================== warnings summary ===============================
src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13
src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13
src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13
src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13
src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13
src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13
/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py:13: PytestCollectionWarning: cannot collect test class 'TestCommandLoader' because it has a __init__ constructor (from: azure/cli/core/tests/test_help_loaders.py)
class TestCommandLoader(AzCommandsLoader):
../../../../usr/lib/python3.11/site-packages/invoke/loader.py:3
../../../../usr/lib/python3.11/site-packages/invoke/loader.py:3
../../../../usr/lib/python3.11/site-packages/invoke/loader.py:3
../../../../usr/lib/python3.11/site-packages/invoke/loader.py:3
../../../../usr/lib/python3.11/site-packages/invoke/loader.py:3
../../../../usr/lib/python3.11/site-packages/invoke/loader.py:3
/usr/lib/python3.11/site-packages/invoke/loader.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
../../../../usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28
../../../../usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28
../../../../usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28
../../../../usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28
../../../../usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28
../../../../usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28
/usr/lib/python3.11/site-packages/azure/core/rest/_helpers.py:28: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
azure/cli/core/tests/test_application.py::TestApplication::test_client_request_id_is_refreshed_after_execution
/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/tests/test_application.py:56: DeprecationWarning: Please use assertNotEqual instead.
self.assertNotEquals(old_id, cli.data['headers']['x-ms-client-request-id'])
azure/cli/core/tests/test_application.py::TestApplication::test_client_request_id_is_refreshed_correctly
/builddir/build/BUILD/azure-cli-azure-cli-2.37.0/src/azure-cli-core/azure/cli/core/tests/test_application.py:35: DeprecationWarning: Please use assertNotEqual instead.
self.assertNotEquals(old_id, cli.data['headers']['x-ms-client-request-id'])
azure/cli/core/tests/test_command_registration.py: 10 warnings
/usr/lib64/python3.11/unittest/case.py:1176: DeprecationWarning: assertDictContainsSubset is deprecated
warnings.warn('assertDictContainsSubset is deprecated',
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED src/azure-cli-core/azure/cli/core/commands/tests/test_client_factory.py::TestClientFactory::test_get_mgmt_service_client
FAILED src/azure-cli-core/azure/cli/core/tests/test_command_registration.py::TestCommandRegistration::test_command_index
FAILED src/azure-cli-core/azure/cli/core/tests/test_command_registration.py::TestCommandRegistration::test_command_index_always_loaded_extensions
FAILED src/azure-cli-core/azure/cli/core/tests/test_generic_update.py::GenericUpdateTest::test_generic_update_empty_nodes
FAILED src/azure-cli-core/azure/cli/core/tests/test_generic_update.py::GenericUpdateTest::test_generic_update_errors
FAILED src/azure-cli-core/azure/cli/core/tests/test_generic_update.py::GenericUpdateTest::test_generic_update_scenario
FAILED src/azure-cli-core/azure/cli/core/tests/test_parser.py::TestParser::test_case_insensitive_enum_choices
FAILED src/azure-cli-core/azure/cli/core/tests/test_parser.py::TestParser::test_nargs_parameter
FAILED src/azure-cli-core/azure/cli/core/tests/test_parser.py::TestParser::test_parser_error_spellchecker
FAILED src/azure-cli-core/azure/cli/core/tests/test_parser.py::TestParser::test_register_simple_commands
FAILED src/azure-cli-core/azure/cli/core/tests/test_parser.py::TestParser::test_required_parameter
FAILED src/azure-cli-core/azure/cli/core/tests/test_help.py::HelpTest::test_help_loads
FAILED src/azure-cli-core/azure/cli/core/tests/test_help.py::TestHelpLoads::test_basic
FAILED src/azure-cli-core/azure/cli/core/tests/test_help.py::TestHelpLoads::test_load_from_help_json
FAILED src/azure-cli-core/azure/cli/core/tests/test_help.py::TestHelpLoads::test_load_from_help_py
FAILED src/azure-cli-core/azure/cli/core/tests/test_help.py::TestHelpLoads::test_load_from_help_yaml
=========== 16 failed, 312 passed, 1 skipped, 30 warnings in 10.96s ============
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment