From 0091ab004c6fef7ed70975e877f21f63b449b968 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 28 Sep 2024 15:29:54 -0700 Subject: [PATCH] fix: Update autocomplete test to handle partial file names --- tests/basic/test_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/basic/test_io.py b/tests/basic/test_io.py index 19a280563..02befeb63 100644 --- a/tests/basic/test_io.py +++ b/tests/basic/test_io.py @@ -48,7 +48,7 @@ class TestInputOutput(unittest.TestCase): # Input text, Expected completion texts ("/", ["/help", "/add", "/drop"]), ("/a", ["/add"]), - ("/add ", ["file1.txt", "file2.txt"]), + ("/add f", ["file1.txt", "file2.txt"]), ] # Step 6: Iterate through test cases @@ -71,7 +71,7 @@ class TestInputOutput(unittest.TestCase): completion_texts = [comp.text for comp in completions] # Assert that the completions match expected results - self.assertEqual(completion_texts, expected_completions) + self.assertEqual(set(completion_texts), set(expected_completions)) def test_autocompleter_with_non_existent_file(self): root = ""