Skip to content

Commit 66d908f

Browse files
committed
add test_load_locale()
1 parent e94d2a0 commit 66d908f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/test_ai_tutor.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,18 @@ def test_get_prompt__has__homework__msg__instruction(
261261
), f"Could not find instruction: {instruction} in result: {result}."
262262

263263

264+
def test_load_locale(explanation_in:str, homework:Tuple[str]):
265+
result = ai_tutor.load_locale(explanation_in)
266+
267+
assert 'directive' in result
268+
269+
assert any(
270+
map(
271+
lambda x: x in result['directive'].lower(),
272+
homework
273+
)
274+
)
275+
276+
264277
if '__main__' == __name__:
265278
pytest.main([__file__])

0 commit comments

Comments
 (0)