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

Test not running with --disable-socket option #204969

Closed
michaell-cropx opened this issue Feb 12, 2024 · 3 comments
Closed

Test not running with --disable-socket option #204969

michaell-cropx opened this issue Feb 12, 2024 · 3 comments
Assignees

Comments

@michaell-cropx
Copy link

michaell-cropx commented Feb 12, 2024

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.86.1
  • OS Version: Linux x64 6.5.0-15-generic
    Steps to Reproduce:
  1. add configurations to your pytest.ini addopts = --disable-socket --allow-unix-socket --allow-hosts 127.0.0.1
  2. Try to run the test.

On each update, I have to perform manual fixes to make it work
If tests are failing on trying to open the socket connection
go to file
~/.vscode/extensions/ms-python.python-/pythonFiles/vscode_pytest/init.py::post_response
change line 734:
addr = ("localhost", int(TEST_PORT))
to
addr = ("127.0.0.1", int(TEST_PORT))
make sure that your pytest.ini file contains
addopts = --disable-socket --allow-unix-socket --allow-hosts 127.0.0.1

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.86.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@michaell-cropx
Copy link
Author

I have updated to version 1.86.1 same behavior

@eleanorjboyd
Copy link
Member

know issue, see microsoft/vscode-python#22383. Currently working on switching to named pipes which will re-enable the use of disable-socket

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants