From 4dfbdd5dd20d947a19b84ba6b36e6e403059ed70 Mon Sep 17 00:00:00 2001 From: Umar Butler Date: Tue, 7 Nov 2023 00:05:15 +1100 Subject: [PATCH] Increased code coverage to 100%. --- tests/test_semchunk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_semchunk.py b/tests/test_semchunk.py index 37127c2..46eac80 100644 --- a/tests/test_semchunk.py +++ b/tests/test_semchunk.py @@ -28,4 +28,7 @@ def test_chunk() -> None: # Test that recombining lowercased chunks stripped of whitespace yields the original text. lowercased_no_whitespace = ''.join(sample.lower().split()) - assert ''.join(semchunk.chunk(lowercased_no_whitespace, chunk_size, _token_counter)) == lowercased_no_whitespace \ No newline at end of file + assert ''.join(semchunk.chunk(lowercased_no_whitespace, chunk_size, _token_counter)) == lowercased_no_whitespace + + # Test a string where tabs must be used as splitters (to increase code coverage). + assert semchunk.chunk('ThisIs\tATest.', 4, _token_counter) == ['ThisIs', 'ATest.'] \ No newline at end of file