MCPcopy
hub / github.com/redis/redis-py / test_network_connection_failure

Function test_network_connection_failure

tests/test_connection.py:689–694  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

687
688@pytest.mark.fixed_client
689def test_network_connection_failure():
690 # Match only the stable part of the error message across OS
691 exp_err = rf"Error {ECONNREFUSED} connecting to localhost:9999\."
692 with pytest.raises(ConnectionError, match=exp_err):
693 redis = Redis(port=9999)
694 redis.set("a", "b")
695
696
697@pytest.mark.fixed_client

Callers

nothing calls this directly

Calls 2

RedisClass · 0.90
setMethod · 0.45

Tested by

no test coverage detected