File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import print_function
22
33import os
4+
45import pytest
56from utils import create_db , db_connection , drop_tables
7+
68import litecli .sqlexecute
79
810
Original file line number Diff line number Diff line change 33from litecli .packages .special .llm import handle_llm , FinishIteration , USAGE
44
55
6- @patch ("litecli.packages.special.llm.initialize_llm" )
7- @patch ("litecli.packages.special.llm.llm" , new = None )
8- def test_llm_command_without_install (mock_initialize_llm , executor ):
9- """
10- Test that handle_llm initializes llm when it is None and raises FinishIteration.
11- """
12- test_text = r"\llm"
13- cur_mock = executor
14-
15- with pytest .raises (FinishIteration ) as exc_info :
16- handle_llm (test_text , cur_mock )
17-
18- mock_initialize_llm .assert_called_once ()
19- assert exc_info .value .args [0 ] is None
20-
21-
226@patch ("litecli.packages.special.llm.llm" )
237def test_llm_command_without_args (mock_llm , executor ):
248 r"""
You can’t perform that action at this time.
0 commit comments