79613300

Date: 2025-05-08 23:36:01
Score: 2
Natty:
Report link

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 ...
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the exact same problem
  • Low reputation (0.5):
Posted by: martin