Skip to content

Commit 961def7

Browse files
committed
add test function for mutiple report collection
1 parent 51f88d1 commit 961def7

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

tests/test_ai_tutor.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def json_dict(sample_report_path) -> Dict[str, Union[str, List]]:
3333
return result
3434

3535

36-
def test_collect_longrepr(json_dict):
36+
def test_collect_longrepr__returns_non_empty(json_dict):
3737
result = ai_tutor.collect_longrepr(json_dict)
3838

3939
assert result
@@ -51,12 +51,27 @@ def json_dict_div_zero_try_except(div_zero_report_path:pathlib.Path) -> Dict[str
5151
return result
5252

5353

54-
def test_collect_longrepr_div_zero_dict(json_dict_div_zero_try_except:Dict):
54+
def test_collect_longrepr_div_zero_dict__returns_non_empty(json_dict_div_zero_try_except:Dict):
5555
result = ai_tutor.collect_longrepr(json_dict_div_zero_try_except)
5656

5757
assert result
5858

5959

60+
def test_collect_longrepr_from_multiple_reports__returns_non_empty(
61+
sample_report_path,
62+
div_zero_report_path,
63+
):
64+
multiple_reports = (
65+
sample_report_path,
66+
div_zero_report_path
67+
)
68+
result = ai_tutor.collect_longrepr_from_multiple_reports(
69+
multiple_reports
70+
)
71+
72+
assert result
73+
74+
6075
@pytest.fixture(params=('Korean', 'English', 'Bahasa Indonesia', 'Chinese', 'French', 'German', 'Italian', 'Japanese', 'Nederlands', 'Spanish', 'Thai', 'Vietnamese'))
6176
def explanation_in(request) -> str:
6277
return request.param

0 commit comments

Comments
 (0)