Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azdev test fails in pycharm due to a wrong profile #134

Open
bim-msft opened this issue Nov 11, 2019 · 0 comments · May be fixed by #135
Open

azdev test fails in pycharm due to a wrong profile #134

bim-msft opened this issue Nov 11, 2019 · 0 comments · May be fixed by #135
Assignees
Labels
Test azdev test
Milestone

Comments

@bim-msft
Copy link

I'm using azdev test in pycharm to do some tests, but I've noticed the following error:

fore_red = colorama.Fore.RED if not IS_WINDOWS else ''
fore_reset = colorama.Fore.RESET if not IS_WINDOWS else ''
original_profile = raw_cmd('az cloud show --query profile -otsv', show_stderr=False).result
if not profile or original_profile == profile:
profile = original_profile
display('The tests are set to run against current profile {}.'
.format(fore_red + original_profile + fore_reset))

azdev_test_bug1

The profile is latest\r\n\x1b[0m.

Finally the process fails with the following exception:
[WinError 123] The filename, directory name, or volume label syntax is incorrect: 'd:\\repos\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\acr\\tests\\latest\r\n\x1b[0m' Traceback (most recent call last): File "D:\repos\env3\lib\site-packages\knack\cli.py", line 206, in invoke cmd_result = self.invocation.execute(args) File "D:\repos\env3\lib\site-packages\knack\invocation.py", line 208, in execute cmd_result = parsed_args.func(params) File "D:\repos\env3\lib\site-packages\knack\commands.py", line 139, in __call__ return self.handler(*args, **kwargs) File "D:\repos\env3\lib\site-packages\knack\commands.py", line 246, in _command_handler result = op(client, **command_args) if client else op(**command_args) File "D:\repos\azure-cli-dev-tools\azdev\operations\tests\__init__.py", line 48, in run_tests test_index = _get_test_index(profile, discover) File "D:\repos\azure-cli-dev-tools\azdev\operations\tests\__init__.py", line 351, in _get_test_index test_index = _discover_tests(profile) File "D:\repos\azure-cli-dev-tools\azdev\operations\tests\__init__.py", line 262, in _discover_tests tests = _discover_module_tests(mod_name, mod_data) File "D:\repos\azure-cli-dev-tools\azdev\operations\tests\__init__.py", line 179, in _discover_module_tests contents = os.listdir(mod_data['filepath']) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'd:\\repos\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\acr\\tests\\latest\r\n\x1b[0m'

bim-msft added a commit to bim-msft/azure-cli-dev-tools that referenced this issue Nov 11, 2019
bim-msft added a commit to bim-msft/azure-cli-dev-tools that referenced this issue Nov 11, 2019
This reverts commit 9cb1820.
bim-msft added a commit to bim-msft/azure-cli-dev-tools that referenced this issue Nov 11, 2019
@bim-msft bim-msft linked a pull request Nov 11, 2019 that will close this issue
@haroldrandom haroldrandom added the Test azdev test label Mar 26, 2020
@haroldrandom haroldrandom added this to the S168 milestone Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test azdev test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants