Open MicroNateId opened 3 weeks ago
Hello- could you clarify what you mean here? You want to be able to run pytest with sudo level permissions? And you want this to be possible through the pytest.ini
file? That file and its rules are set by pytest, all we do is run pytest and it picks the ini file up.
Yes, I have several Tests that interact with an AMD python api that requires system root access. Not sure if there is a way to implement this similar to what is done with the debugger sudo option?
On Mon, Nov 11, 2024, 9:51 AM Eleanor Boyd @.***> wrote:
Hello- could you clarify what you mean here? You want to be able to run pytest with sudo level permissions? And you want this to be possible through the pytest.ini file? That file and its rules are set by pytest, all we do is run pytest and it picks the ini file up.
— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-python/issues/24411#issuecomment-2468624442, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSG5TCXH5RANVQ36ZHQ7M32ADOBZAVCNFSM6AAAAABROPA5XCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYGYZDINBUGI . You are receiving this because you authored the thread.Message ID: @.***>
Adding some more context. I've found a workaround that is temporary at best (changing the path of the pytest to "sudo pytest" within the configs) however, this causes issues as the vscode Test interface creates a lot of files when running and having them be owned by root is randomly causing issues.
Please add the option of sudo in pytest.ini.
Some scripts require sudo elevation to run in VSCODE and there's no clear way to do this.