()
| 687 | |
| 688 | @pytest.mark.fixed_client |
| 689 | def 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 |