File tree Expand file tree Collapse file tree
src/azure-cli/azure/cli/command_modules/maps/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# Copyright (c) Microsoft Corporation. All rights reserved.
33# Licensed under the MIT License. See License.txt in the project root for license information.
44# --------------------------------------------------------------------------------------------
5- import pkg_resources
6- pkg_resources .declare_namespace (__name__ )
Original file line number Diff line number Diff line change 22# Copyright (c) Microsoft Corporation. All rights reserved.
33# Licensed under the MIT License. See License.txt in the project root for license information.
44# --------------------------------------------------------------------------------------------
5- import pkg_resources
6- pkg_resources .declare_namespace (__name__ )
Original file line number Diff line number Diff line change 22# Copyright (c) Microsoft Corporation. All rights reserved.
33# Licensed under the MIT License. See License.txt in the project root for license information.
44# --------------------------------------------------------------------------------------------
5- import pkg_resources
6- pkg_resources .declare_namespace (__name__ )
Original file line number Diff line number Diff line change 22# Copyright (c) Microsoft Corporation. All rights reserved.
33# Licensed under the MIT License. See License.txt in the project root for license information.
44# --------------------------------------------------------------------------------------------
5- import pkg_resources
6- pkg_resources .declare_namespace (__name__ )
Original file line number Diff line number Diff line change 1212import filecmp
1313import logging
1414import unittest
15- from pkg_resources import working_set
15+ from importlib . metadata import distributions
1616
1717import automation .utilities .path as automation_path
1818from automation .utilities .const import COMMAND_MODULE_PREFIX
@@ -48,7 +48,7 @@ def test_azure_cli_installation(self):
4848 def test_azure_cli_module_installation (self ):
4949 expected_modules = set ([n for n , _ in automation_path .get_command_modules_paths (include_prefix = True )])
5050
51- installed_command_modules = [dist .key for dist in list ( working_set ) if dist .key .startswith (COMMAND_MODULE_PREFIX )]
51+ installed_command_modules = [dist .metadata [ 'Name' ] for dist in distributions ( ) if dist .metadata [ 'Name' ] .startswith (COMMAND_MODULE_PREFIX )]
5252
5353 logger .info ('Installed command modules %s' , installed_command_modules )
5454
You can’t perform that action at this time.
0 commit comments