Skip to content

Test discovery doesn't work into container #21637

Closed as not planned
Closed as not planned
@akarev0

Description

@akarev0

Hi there, I used devcontainer for my work but I cannot now, I can discover the tests, but I cannot run it because of incorrect path (as I can assume because debug setup with full path from launch.json works fine)

I am using following setting for my devcontainer:

"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
    "-c",
    "Tests/pytest.docker-compose.ini",
    "Tests"
]

but as I can see while I am trying to run test path starts from one folder inside and not tests folder, for example:
unit/test_third_api.py
while it should be:
Tests/unit/test_third_api.py
because path is incorrect I see Error: ERROR: file or directory not found: integration/...

Since I am using devcontainer top level folder was app previously, not it is one level into it not app but Tests

Also color indication does not work at all I mean it does not representing any info, not green check marks nor red crosses

OS: ubuntu 22.04
vscode: 1.80.0

Temporary solution: change extension version from 2023.12.0 to 2023.8.0 works fine for me

Metadata

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from postertriage-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