File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 77from mellea .backends .types import ModelOption
88from mellea .stdlib .base import ChatContext , ModelOutputThunk
99from mellea .stdlib .chat import Message
10- from mellea .stdlib .session import start_session
10+ from mellea .stdlib .session import start_session , MelleaSession
1111
1212
1313# We edit the context type in the async tests below. Don't change the scope here.
@@ -134,5 +134,17 @@ def test_session_copy_with_context_ops(m_session):
134134 assert m2 .ctx .previous_node .previous_node is m_session .ctx
135135
136136
137+ class TestPowerup :
138+ def hello (m :MelleaSession ):
139+ return "hello"
140+
141+
142+ def test_powerup (m_session ):
143+
144+ MelleaSession .powerup (TestPowerup )
145+
146+ assert "hello" == m_session .hello ()
147+
148+
137149if __name__ == "__main__" :
138150 pytest .main ([__file__ ])
You can’t perform that action at this time.
0 commit comments