Move fixtures to decorators in core tests (#119675)

This commit is contained in:
epenet
2024-06-14 13:32:42 +02:00
committed by GitHub
parent b80f7185b2
commit 01be5d5f6b
9 changed files with 80 additions and 109 deletions

View File

@@ -20,7 +20,8 @@ def test_sockets_disabled() -> None:
socket.socket()
def test_sockets_enabled(socket_enabled: None) -> None:
@pytest.mark.usefixtures("socket_enabled")
def test_sockets_enabled() -> None:
"""Test we can't connect to an address different from 127.0.0.1."""
mysocket = socket.socket()
with pytest.raises(pytest_socket.SocketConnectBlockedError):