I have the exact same problem, currently running pytest 8.3.5 from vscode, in my case I tried a couple of thing, including changing pytest.ini
to
[pytest]
addopts =
noops = true #it didn't work
Another attempt was to find run_pytest_script.py
inside your .vscode-server/extensions.. and replace
#arg_array = ["-p", "vscode_pytest", *args, *ids]
print("Running pytest with args: " + str(arg_array))
pytest.main([]) #removed arg_array from params
That breaks to vscode testing for some bizarre issue I couldn't find. Original code here
What ended up works was a change in my code since I use pedantic:
ExeConfig.config = SettingsConfigDict(
case_sensitive=False,
cli_parse_args=True,
cli_ignore_unknown_args=True, # this should ignore the --rootdir ...