From f5bb508736dfada4b1ef12608b3a8339f4a8bab7 Mon Sep 17 00:00:00 2001 From: TaskerJang Date: Sun, 25 May 2025 07:55:18 +0900 Subject: [PATCH] fix: use identity check for None comparison in clip_tokens tests - Replace `== None` with `is None` in test_empty_input_text method - Follow Python best practice for None comparisons as recommended in code review - Address feedback from PR #1816 review comment Co-authored-by: mrT23 --- tests/unittest/test_clip_tokens.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unittest/test_clip_tokens.py b/tests/unittest/test_clip_tokens.py index f791b92f..a42ef929 100644 --- a/tests/unittest/test_clip_tokens.py +++ b/tests/unittest/test_clip_tokens.py @@ -10,7 +10,7 @@ class TestClipTokens: def test_empty_input_text(self): """Test that empty input returns empty string.""" assert clip_tokens("", 10) == "" - assert clip_tokens(None, 10) == None + assert clip_tokens(None, 10) is None def test_text_under_token_limit(self): """Test that text under the token limit is returned unchanged."""