Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode-pytest unable to read testIds from temp file, file not created #24406

Open
RamiAwar opened this issue Nov 8, 2024 · 0 comments
Open
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@RamiAwar
Copy link

RamiAwar commented Nov 8, 2024

I'm getting an error running Pytest on an individual test (using the Test Explorer).
It ends up running the entire test suite instead. Here are some more details. Was told to open this after finding a similar issue, but seems unconnected (#24307 (comment)).

Error[vscode-pytest]: unable to read testIds from temp file[Errno 2] No such file or directory: '/tmp/test-ids-e2faf2fe418633dcef80.txt'

I'm trying to run one test but it 'fails to detect the test ID'.

Note that I'm using devcontainers, with Python + Pylance + pytest explorer installed inside.

Also, not sure if relevant: I looked at /tmp/ but can't see any files named like this. I only see files named like python-test-discovery-698debb64df061b8b350.sock

LOGS:

2024-10-31 22:11:25.650 [info] Attempting to use temp directory for test ids file, file name: test-ids-750dd803c28e00398642.txt
env vars: "TEST_RUN_PIPE":"/tmp/python-test-results-59956af0fc8ae043f0d0.sock","RUN_TEST_IDS_PIPE":"/tmp/test-ids-750dd803c28e00398642.txt"}

2024-10-31 22:11:25.658 [info] Running pytest with arguments: /root/.vscode-server/extensions/ms-python.python-2024.16.1-linux-arm64/python_files/vscode_pytest/run_pytest_script.py --rootdir=/code/myproj

2024-10-31 22:11:25.658 [info] > /usr/local/bin/python ~/.vscode-server/extensions/ms-python.python-2024.16.1-linux-arm64/python_files/vscode_pytest/run_pytest_script.py --rootdir=.

2024-10-31 22:11:25.658 [info] cwd: .

At this point I see this in my test results:

Error[vscode-pytest]: unable to read testIds from temp file[Errno 2] No such file or directory: '/tmp/test-ids-750dd803c28e00398642.txt'

Python logs don't show anything useful after that and I cancel the test runs. I also watch ls /tmp as I clicked on a test run and only saw the -result files appear. No IDs files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants