Skip to content

Commit

Permalink
coverage increased further
Browse files Browse the repository at this point in the history
  • Loading branch information
pseusys committed Jan 31, 2025
1 parent 0cfebbe commit e01e739
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/core/test_context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from copy import copy
import pytest

from chatsky.core.context import Context, ContextError
Expand Down Expand Up @@ -108,6 +109,16 @@ async def test_slice_turn(self, ctx: Context):
assert Message(text=f"text{i}") in responses


async def test_copy(context_factory):
ctx = context_factory()
ctx.misc["key"] = "value"

cpy = copy(ctx)
assert cpy.misc["key"] == "value"
assert cpy._storage == ctx._storage
assert cpy == ctx


async def test_pipeline_available():
class MyResponse(BaseResponse):
async def call(self, ctx: Context) -> MessageInitTypes:
Expand Down

0 comments on commit e01e739

Please sign in to comment.