Skip to content

Commit b76208b

Browse files
authored
Fix: Update mistral tests to avoid shared agents (#398)
We can't reuse the same agent instance when running in parallel Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com>
1 parent d97fcb5 commit b76208b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests_integ/models/test_model_mistral.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
pytestmark = providers.mistral.mark
1313

1414

15-
@pytest.fixture(scope="module")
15+
@pytest.fixture()
1616
def streaming_model():
1717
return MistralModel(
1818
model_id="mistral-medium-latest",
@@ -24,7 +24,7 @@ def streaming_model():
2424
)
2525

2626

27-
@pytest.fixture(scope="module")
27+
@pytest.fixture()
2828
def non_streaming_model():
2929
return MistralModel(
3030
model_id="mistral-medium-latest",
@@ -36,12 +36,12 @@ def non_streaming_model():
3636
)
3737

3838

39-
@pytest.fixture(scope="module")
39+
@pytest.fixture()
4040
def system_prompt():
4141
return "You are an AI assistant that provides helpful and accurate information."
4242

4343

44-
@pytest.fixture(scope="module")
44+
@pytest.fixture()
4545
def tools():
4646
@strands.tool
4747
def tool_time() -> str:
@@ -54,12 +54,12 @@ def tool_weather() -> str:
5454
return [tool_time, tool_weather]
5555

5656

57-
@pytest.fixture(scope="module")
57+
@pytest.fixture()
5858
def streaming_agent(streaming_model, tools):
5959
return Agent(model=streaming_model, tools=tools)
6060

6161

62-
@pytest.fixture(scope="module")
62+
@pytest.fixture()
6363
def non_streaming_agent(non_streaming_model, tools):
6464
return Agent(model=non_streaming_model, tools=tools)
6565

@@ -69,7 +69,7 @@ def agent(request):
6969
return request.getfixturevalue(request.param)
7070

7171

72-
@pytest.fixture(scope="module")
72+
@pytest.fixture()
7373
def weather():
7474
class Weather(BaseModel):
7575
"""Extracts the time and weather from the user's message with the exact strings."""

0 commit comments

Comments
 (0)