diff --git a/tests/tools/ColemanLiauIndex_test.py b/tests/tools/ColemanLiauIndex_test.py index 5c902edb1..9036e9833 100644 --- a/tests/tools/ColemanLiauIndex_test.py +++ b/tests/tools/ColemanLiauIndex_test.py @@ -18,4 +18,17 @@ def test_initialization(): @pytest.mark.unit def test_call(): tool = Tool() - assert tool(10, 10) == str(20) \ No newline at end of file + # Example input text for CLI calculation + input_data = {"input_text": "This is a simple test text. It contains two sentences."} + + # Calculating expected CLI score manually + num_sentences = 2 + num_words = 10 + num_characters = 42 + + L = (num_characters / num_words) * 100 + S = (num_sentences / num_words) * 100 + expected_cli_score = 0.0588 * L - 0.296 * S - 15.8 + + # Assert that the CLI tool calculates the expected value + assert tool(input_data) == pytest.approx(expected_cli_score, 0.01) \ No newline at end of file