MCPcopy Create free account
hub / github.com/dot-agent/nextpy / state_manager_redis

Function state_manager_redis

tests/test_state.py:1501–1514  ·  view source on GitHub ↗

Instance of state manager for redis only. Yields: A state manager instance

()

Source from the content-addressed store, hash-verified

1499
1500@pytest.fixture(scope="function")
1501def state_manager_redis() -> Generator[StateManager, None, None]:
1502 """Instance of state manager for redis only.
1503
1504 Yields:
1505 A state manager instance
1506 """
1507 state_manager = StateManager.create(TestState)
1508
1509 if not isinstance(state_manager, StateManagerRedis):
1510 pytest.skip("Test requires redis")
1511
1512 yield state_manager
1513
1514 asyncio.get_event_loop().run_until_complete(state_manager.close())
1515
1516
1517@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

closeMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected