Skip to content

Commit a7a01d1

Browse files
author
patched.codes[bot]
committed
Patched tests/steps/test_SimplifiedLLM.py
1 parent c37771e commit a7a01d1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/steps/test_SimplifiedLLM.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ def test_invalid(inputs):
2626

2727

2828
def test_non_json_run(mocker):
29+
"""Tests the non-JSON run functionality of the SimplifiedLLM class.
30+
31+
This test function mocks the behavior of PreparePrompt, CallLLM, and ExtractModelResponse
32+
classes to simulate a complete run of the SimplifiedLLM without actually calling external services.
33+
It verifies that the SimplifiedLLM correctly processes inputs, calls the necessary methods,
34+
and passes the right parameters between steps.
35+
36+
Args:
37+
mocker (pytest.MockFixture): Pytest fixture for mocking.
38+
39+
Returns:
40+
None: This test function doesn't return anything. It uses assertions to verify the behavior.
41+
42+
Raises:
43+
AssertionError: If any of the assertions fail, indicating that the SimplifiedLLM
44+
is not behaving as expected.
45+
"""
2946
inputs = dict(
3047
prompt_user="user",
3148
prompt_system="system",
@@ -75,6 +92,19 @@ def test_non_json_run(mocker):
7592

7693

7794
def test_json_run(mocker):
95+
"""Test the JSON run functionality of SimplifiedLLM
96+
97+
This method tests the SimplifiedLLM class's run method when JSON output is requested. It mocks the PreparePrompt, CallLLM, and ExtractModelResponse classes to simulate their behavior and verifies that the SimplifiedLLM correctly processes inputs and calls the necessary methods.
98+
99+
Args:
100+
mocker (pytest.MockFixture): A pytest fixture for mocking objects and functions.
101+
102+
Returns:
103+
None: This method doesn't return anything explicitly. It uses assertions to verify the correct behavior.
104+
105+
Raises:
106+
AssertionError: If any of the assertions fail, indicating that the SimplifiedLLM class is not behaving as expected.
107+
"""
78108
inputs = dict(
79109
prompt_user="user",
80110
prompt_system="system",

0 commit comments

Comments
 (0)