File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-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# We edit the context type in the async tests below. Don't change the scope here.
1313@pytest .fixture (scope = "function" )
@@ -125,5 +125,18 @@ def test_session_copy_with_context_ops(m_session):
125125 assert m1 .ctx .previous_node .previous_node is m_session .ctx
126126 assert m2 .ctx .previous_node .previous_node is m_session .ctx
127127
128+
129+ class TestPowerup :
130+ def hello (m :MelleaSession ):
131+ return "hello"
132+
133+
134+ def test_powerup (m_session ):
135+
136+ MelleaSession .powerup (TestPowerup )
137+
138+ assert "hello" == m_session .hello ()
139+
140+
128141if __name__ == "__main__" :
129142 pytest .main ([__file__ ])
You can’t perform that action at this time.
0 commit comments