Azure / Azure/azure-cli-dev-tools

`azdev test` fails in pycharm due to a wrong profile

Open
#134 0 comments 0 reactions 2 assignees Claimed by @bim-msft View on GitHub
Test
Dominant language
Python
Stars
91
Forks
134
Avg merge
2h 51m
Merged PRs (30d)
1

Description

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

https://github.com/Azure/azure-cli-dev-tools/blob/d3c663ebdac619bce2cb5a5bd103aefd76ef4503/azdev/operations/tests/__init__.py#L152-L158

![azdev_test_bug1](https://user-images.githubusercontent.com/3250203/68573249-54138580-04a2-11ea-9f25-e15cce67b546.png)

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'`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.