Skip to content

Commit 6fefdc4

Browse files
committed
test: improve coverage with additional and updated test cases
1 parent 75f3415 commit 6fefdc4

File tree

5 files changed

+1377
-52
lines changed

5 files changed

+1377
-52
lines changed

tests/test_calendar.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,10 @@ def test_dateframe_create_class_method(self, root):
659659
def test_dateframe_update_entry_text(self, root):
660660
"""Test DateFrame _update_entry_text method."""
661661
df = DateFrame(root)
662+
663+
# Mock the entry's get method to return expected value
664+
df.entry.get = Mock(return_value="2024-03-15")
665+
662666
df._update_entry_text("2024-03-15")
663667

664668
# Check that entry text was updated
@@ -792,6 +796,10 @@ def test_dateentry_setup_style(self, root):
792796
def test_dateentry_update_entry_text(self, root):
793797
"""Test DateEntry _update_entry_text method."""
794798
de = DateEntry(root)
799+
800+
# Mock the get method to return expected value
801+
de.get = Mock(return_value="2024-03-15")
802+
795803
de._update_entry_text("2024-03-15")
796804

797805
# Check that entry text was updated

0 commit comments

Comments
 (0)