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

Method background_task_reset

tests/test_state.py:1732–1743  ·  view source on GitHub ↗

A background task that resets the state.

(self)

Source from the content-addressed store, hash-verified

1730
1731 @xt.background
1732 async def background_task_reset(self):
1733 """A background task that resets the state."""
1734 with pytest.raises(ImmutableStateError):
1735 # Resetting the state should be explicitly blocked.
1736 self.reset()
1737
1738 async with self:
1739 self.order.append("foo")
1740 self.reset()
1741 assert not self.order
1742 async with self:
1743 self.order.append("reset")
1744
1745 @xt.background
1746 async def background_task_generator(self):

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected