From d9009267c2bcc4b200bc7c66fa5eb18b914bcc9a Mon Sep 17 00:00:00 2001 From: EH225 Date: Mon, 24 Mar 2025 17:24:10 -0400 Subject: [PATCH] add more assert msg --- tests/test_data_structures.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_data_structures.py b/tests/test_data_structures.py index 925f11f..32aa6fc 100644 --- a/tests/test_data_structures.py +++ b/tests/test_data_structures.py @@ -343,21 +343,21 @@ def test_Trie(): obj = Trie(words) obj.insert("another") - assert obj.get_word_count("is") == 1 + assert obj.get_word_count("is") == 1, "Test for get_word_count failed" obj.insert("is") - assert obj.get_word_count("is") == 2 + assert obj.get_word_count("is") == 2, "Test for get_word_count failed" obj.get_word_count("unknown") - assert obj.is_word("is") is True + assert obj.is_word("is") is True, "Test for is_word failed" - assert obj.is_word("something") is False + assert obj.is_word("something") is False, "Test for is_word failed" assert len(obj) == 15 - assert obj.get_prefix_word_count("w") == 3 - assert obj.is_prefix("wo") is True - assert obj.is_prefix("work") is True - assert obj.is_prefix("worked") is False + assert obj.get_prefix_word_count("w") == 3, "Test for get_prefix_word_count failed" + assert obj.is_prefix("wo") is True, "Test for is_prefix failed" + assert obj.is_prefix("work") is True, "Test for is_prefix failed" + assert obj.is_prefix("worked") is False, "Test for is_prefix failed" obj.remove_word("is") assert obj.get_word_count("is") == 1, "Test for get_word_count failed"