8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pytest
This issue is discovered while investigating Azure/azure-cli#27016
In the below example, '%(levelname)s %(name)s %(thread)d %(threadName)s %(message)s' is not quoted when being passed to pytest:
'%(levelname)s %(name)s %(thread)d %(threadName)s %(message)s'
> azdev test test_keyvault_certificate_soft_delete --debug --pytest-args --log-level=DEBUG --log-format '%(levelname)s %(name)s %(thread)d %(threadName)s %(message)s' cli.azdev.operations.testtool.pytest_runner: Running: python -m pytest -x -v -p no:warnings --log-level=WARN --junit-xml C:\Users\xxx\.azdev\env_config\cli\py310\test_results.xml d:\cli\azure-cli\src\azure-cli\azure\cli\command_modules\keyvault\tests\latest\test_keyvault_commands.py::KeyVaultCertificateRestoreScenarioTest::test_keyvault_certificate_soft_delete -n auto --log-level=DEBUG --log-format %(levelname)s %(name)s %(thread)d %(threa 5D2B dName)s %(message)s
This is because arguments with spaces are not quoted when constructing the command string:
azure-cli-dev-tools/azdev/operations/testtool/pytest_runner.py
Line 38 in da19747
Even though shlex.quote can be used to quote arguments, the recommended approach for calling subprocess.call is "providing a sequence of arguments": https://docs.python.org/3/library/subprocess.html#frequently-used-arguments.
shlex.quote
subprocess.call
Also see: Azure/cli#105
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This issue is discovered while investigating Azure/azure-cli#27016
In the below example,
'%(levelname)s %(name)s %(thread)d %(threadName)s %(message)s'
is not quoted when being passed topytest
:This is because arguments with spaces are not quoted when constructing the command string:
azure-cli-dev-tools/azdev/operations/testtool/pytest_runner.py
Line 38 in da19747
Even though
shlex.quote
can be used to quote arguments, the recommended approach for callingsubprocess.call
is "providing a sequence of arguments": https://docs.python.org/3/library/subprocess.html#frequently-used-arguments.Also see: Azure/cli#105
The text was updated successfully, but these errors were encountered: