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
This commit is contained in:
TaskerJang
2025-05-25 07:55:18 +09:00
parent e2586cb64a
commit f5bb508736

View File

@ -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."""