Skip to content

Commit 42b0d44

Browse files
committed
test: testing powerup
1 parent 1e31264 commit 42b0d44

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/stdlib_basics/test_session.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from mellea.backends.types import ModelOption
88
from mellea.stdlib.base import ChatContext, ModelOutputThunk
99
from 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+
137149
if __name__ == "__main__":
138150
pytest.main([__file__])

0 commit comments

Comments
 (0)