pytest-socket icon indicating copy to clipboard operation
pytest-socket copied to clipboard

Pytest Plugin to disable socket calls during tests

Results 39 pytest-socket issues
Sort by recently updated
recently updated
newest added

Bumps [httpx](https://github.com/encode/httpx) from 0.27.0 to 0.27.2. Release notes Sourced from httpx's releases. Version 0.27.2 0.27.2 (27th August, 2024) Fixed Reintroduced supposedly-private URLTypes shortcut. (#2673) Version 0.27.1 0.27.1 (27th August, 2024)...

dependencies
python

updates: - [github.com/editorconfig-checker/editorconfig-checker.python: 2.7.3 → 3.0.3](https://github.com/editorconfig-checker/editorconfig-checker.python/compare/2.7.3...3.0.3)

To avoid resolving the allowed hostnames once per test, cache the results in a shared dict. This should result in one set of resolutions per pytest run (or test worker,...

enhancement

Add testing against the Python 3.13 beta release. - **.github/workflows/python.yml** - Add `3.13` to the `python-version` matrix. - **pyproject.toml** - Add `3.13` to the `classifiers` section under `Programming Language ::...

Bumps [starlette](https://github.com/encode/starlette) from 0.40.0 to 0.41.0. Release notes Sourced from starlette's releases. Version 0.41.0 Added Allow to raise HTTPException before websocket.accept() encode/starlette#2725 Changelog Sourced from starlette's changelog. 0.41.0 (October 15,...

dependencies
python

Thank you for this plugin, which helps keep our tests fast and safe! One piece of information that can still leak out even when using it, though, is DNS lookups....

enhancement
help wanted

Bumps [starlette](https://github.com/encode/starlette) from 0.47.0 to 0.47.1. Release notes Sourced from starlette's releases. Version 0.47.1 Fixed Use Self in TestClient.__enter__ #2951 Allow async exception handlers to type-check #2949 Full Changelog: https://github.com/encode/starlette/compare/0.47.0...0.47.1...

dependencies
python

Hi! I ran into an issue with my tests: ```python .venv/lib/python3.13/site-packages/bluetooth_auto_recovery/recover.py:204: in setup self.sock = btmgmt_socket.open() .venv/lib/python3.13/site-packages/btsocket/btmgmt_socket.py:69: in open sock_fd = socket.socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI, fileno=fd) _ _ _ _ _...

stale

It would be useful if pytest-socket supported allowing `connect()` to specific host/port combinations, instead of a blanket guard on all socket creation. The reason for this is when using testcontainers...

enhancement

When using `--allow-hosts` to permit network connections to specific hostnames, `pytest-socket` resolves these hostnames to IP addresses at the start of the test session. However, libraries like `boto3` (which utilizes...