@@ -827,7 +827,7 @@ def test_get_context_token_count_includes_schema_overhead(
827827 )
828828 agent = AtomicAgent [BasicChatInputSchema , BasicChatOutputSchema ](config )
829829
830- result = agent .get_context_token_count ()
830+ agent .get_context_token_count ()
831831
832832 # Verify count_context was called with system message that includes schema
833833 call_args = mock_counter_instance .count_context .call_args
@@ -860,7 +860,7 @@ def test_get_context_token_count_no_system_prompt(mock_get_token_counter, mock_i
860860 )
861861 agent = AtomicAgent [BasicChatInputSchema , BasicChatOutputSchema ](config )
862862
863- result = agent .get_context_token_count ()
863+ agent .get_context_token_count ()
864864
865865 # Even without system prompt, schema should be included (for JSON mode)
866866 call_args = mock_counter_instance .count_context .call_args
@@ -932,7 +932,7 @@ def hook_handler(result):
932932
933933 agent .register_hook ("token:counted" , hook_handler )
934934
935- result = agent .get_context_token_count ()
935+ agent .get_context_token_count ()
936936
937937 assert len (hook_called ) == 1
938938 assert hook_called [0 ] == expected_result
@@ -965,7 +965,6 @@ def hook_handler(result):
965965def test_get_context_token_count_multimodal_content (mock_get_token_counter , mock_instructor ):
966966 """Test that multimodal content is properly serialized for token counting."""
967967 from instructor .processing .multimodal import Image
968- from instructor import Mode
969968
970969 mock_counter_instance = Mock ()
971970 mock_get_token_counter .return_value = mock_counter_instance
@@ -993,7 +992,7 @@ class MultimodalInputSchema(BaseIOSchema):
993992 agent .history .add_message ("user" , multimodal_input )
994993
995994 # Get token count
996- result = agent .get_context_token_count ()
995+ agent .get_context_token_count ()
997996
998997 # Verify count_context was called
999998 assert mock_counter_instance .count_context .called
0 commit comments