Skip to content

Discovery works but execution fails with file not found error #21640

Closed
@abadrinath15

Description

@abadrinath15

Hello,

I didn't seem to have this problem before, but something seems to have gone a bit wonky this week (no changes to config on my end).
Using the vscode Testing pane, I'm seeing tests successfully discovered, but if i try to run (or debug them), they automatically fail with a

ERROR: file or directory not found: <package/module/submodule_1/submodule_2/tests/test_file.py>

Our layout is a bit interesting, but at a high level it's something like

repo\
    lib\
        package\

The terminal spawns at repo, but I have an .env file with PYTHONPATH=lib. All this seemed to have worked until say... Thursday? :) . Perhaps I had it setup wrong. In the debug output, I do see it now showing:
Recieved JSON data: [package/module/submodule_1/submodule_2/tests/test_file.py::tests_blahblah

I've never seen that Received JSON line before; i do wonder if something on the paths is getting a little messed up from the latest version? Apologies for the mediocre output trace; trying to abstract it as much as I can. Let me know what else I could do to be helpful?

I'm using v2023.12.0.

And of course running something like pytest lib\package\module\submodule_1\submodule_2\tests\test_file.py works perfectly fine from terminal!

Thanks.

Metadata

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions