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

Method test_none_resolves_to_default

tests/test_utils.py:48–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 default get the same answer as if they had pinned the wire protocol."""
47
48 def test_none_resolves_to_default(self):
49 # ``DEFAULT_RESP_VERSION`` is the wire version selected when the
50 # caller does not pass ``protocol``; ``check_protocol_version``
51 # must therefore treat ``None`` as that version.
52 assert check_protocol_version(None, DEFAULT_RESP_VERSION) is True
53 other = 2 if DEFAULT_RESP_VERSION == 3 else 3
54 assert check_protocol_version(None, other) is False
55
56 @pytest.mark.parametrize("protocol", [3, "3"])
57 def test_resp3_matches(self, protocol):

Callers

nothing calls this directly

Calls 1

check_protocol_versionFunction · 0.90

Tested by

no test coverage detected