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

Method test_oom_error

tests/test_asyncio/test_connection_pool.py:797–802  ·  view source on GitHub ↗

OOM errors get turned into OutOfMemoryError exceptions

(self, r)

Source from the content-addressed store, hash-verified

795
796 @skip_if_redis_enterprise()
797 async def test_oom_error(self, r):
798 """OOM errors get turned into OutOfMemoryError exceptions"""
799 with pytest.raises(redis.OutOfMemoryError):
800 # note: don't use the DEBUG OOM command since it's not the same
801 # as the db being full
802 await r.execute_command("DEBUG", "ERROR", "OOM blah blah")
803
804 @pytest.mark.fixed_client
805 def test_connect_from_url_tcp(self):

Callers

nothing calls this directly

Calls 1

execute_commandMethod · 0.45

Tested by

no test coverage detected