Skip to content

Commit 3155c9f

Browse files
committed
test: testing powerup
1 parent b89b874 commit 3155c9f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/stdlib_basics/test_session.py

Lines changed: 14 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
# 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+
128141
if __name__ == "__main__":
129142
pytest.main([__file__])

0 commit comments

Comments
 (0)