A programming framework for agentic AI
Add shebang functionality to tests (#1784)
Gunnar Kudrjavetsb8ceb866e630
diff --git a/test/agentchat/contrib/capabilities/test_context_handling.py b/test/agentchat/contrib/capabilities/test_context_handling.pyold mode 100644new mode 100755index cc224d550..d1692cc4b--- a/test/agentchat/contrib/capabilities/test_context_handling.py+++ b/test/agentchat/contrib/capabilities/test_context_handling.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport osimport sysdiff --git a/test/agentchat/contrib/chat_with_teachable_agent.py b/test/agentchat/contrib/chat_with_teachable_agent.pyold mode 100644new mode 100755index 2061f3f43..44449091a--- a/test/agentchat/contrib/chat_with_teachable_agent.py+++ b/test/agentchat/contrib/chat_with_teachable_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from autogen import UserProxyAgent, config_list_from_jsonfrom autogen.agentchat.contrib.capabilities.teachability import Teachabilityfrom autogen import ConversableAgentdiff --git a/test/agentchat/contrib/test_agent_builder.py b/test/agentchat/contrib/test_agent_builder.pyold mode 100644new mode 100755index 3f9d69c32..58df86a32--- a/test/agentchat/contrib/test_agent_builder.py+++ b/test/agentchat/contrib/test_agent_builder.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport osimport jsondiff --git a/test/agentchat/contrib/test_compressible_agent.py b/test/agentchat/contrib/test_compressible_agent.pyold mode 100644new mode 100755index 2d41587aa..eeb08c010--- a/test/agentchat/contrib/test_compressible_agent.py+++ b/test/agentchat/contrib/test_compressible_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport sysimport autogendiff --git a/test/agentchat/contrib/test_gpt_assistant.py b/test/agentchat/contrib/test_gpt_assistant.pyold mode 100644new mode 100755index 23e865c4a..492cbab89--- a/test/agentchat/contrib/test_gpt_assistant.py+++ b/test/agentchat/contrib/test_gpt_assistant.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from unittest.mock import MagicMockimport uuidimport pytestdiff --git a/test/agentchat/contrib/test_img_utils.py b/test/agentchat/contrib/test_img_utils.pyold mode 100644new mode 100755index 39a4a7f60..84dfb1029--- a/test/agentchat/contrib/test_img_utils.py+++ b/test/agentchat/contrib/test_img_utils.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import base64import osimport unittestdiff --git a/test/agentchat/contrib/test_llava.py b/test/agentchat/contrib/test_llava.pyold mode 100644new mode 100755index f73724efe..11fcd3ab5--- a/test/agentchat/contrib/test_llava.py+++ b/test/agentchat/contrib/test_llava.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import unittestfrom unittest.mock import MagicMock, patchdiff --git a/test/agentchat/contrib/test_lmm.py b/test/agentchat/contrib/test_lmm.pyold mode 100644new mode 100755index 5a0d4310e..e97617e8e--- a/test/agentchat/contrib/test_lmm.py+++ b/test/agentchat/contrib/test_lmm.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import unittestfrom unittest.mock import MagicMockdiff --git a/test/agentchat/contrib/test_qdrant_retrievechat.py b/test/agentchat/contrib/test_qdrant_retrievechat.pyold mode 100644new mode 100755index 1a18e78a4..63a50e924--- a/test/agentchat/contrib/test_qdrant_retrievechat.py+++ b/test/agentchat/contrib/test_qdrant_retrievechat.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import osimport sysimport pytestdiff --git a/test/agentchat/contrib/test_retrievechat.py b/test/agentchat/contrib/test_retrievechat.pyold mode 100644new mode 100755index eeda1dc48..cd6a8c048--- a/test/agentchat/contrib/test_retrievechat.py+++ b/test/agentchat/contrib/test_retrievechat.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport osimport sysdiff --git a/test/agentchat/contrib/test_society_of_mind_agent.py b/test/agentchat/contrib/test_society_of_mind_agent.pyold mode 100644new mode 100755index c4303f8b4..b439a1773--- a/test/agentchat/contrib/test_society_of_mind_agent.py+++ b/test/agentchat/contrib/test_society_of_mind_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport sysimport autogendiff --git a/test/agentchat/contrib/test_teachable_agent.py b/test/agentchat/contrib/test_teachable_agent.pyold mode 100644new mode 100755index 7707a0bfa..e12921379--- a/test/agentchat/contrib/test_teachable_agent.py+++ b/test/agentchat/contrib/test_teachable_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport osimport sysdiff --git a/test/agentchat/contrib/test_web_surfer.py b/test/agentchat/contrib/test_web_surfer.pyold mode 100644new mode 100755index d5dae0beb..71325fc9c--- a/test/agentchat/contrib/test_web_surfer.py+++ b/test/agentchat/contrib/test_web_surfer.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import osimport sysimport rediff --git a/test/agentchat/test_agent_usage.py b/test/agentchat/test_agent_usage.pyold mode 100644new mode 100755index 38268849f..7622e908f--- a/test/agentchat/test_agent_usage.py+++ b/test/agentchat/test_agent_usage.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from autogen import gather_usage_summaryfrom autogen import AssistantAgent, UserProxyAgentfrom test_assistant_agent import KEY_LOC, OAI_CONFIG_LISTdiff --git a/test/agentchat/test_assistant_agent.py b/test/agentchat/test_assistant_agent.pyold mode 100644new mode 100755index 0544bdad2..c79780b30--- a/test/agentchat/test_assistant_agent.py+++ b/test/agentchat/test_assistant_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import osimport sysimport pytestdiff --git a/test/agentchat/test_async.py b/test/agentchat/test_async.pyold mode 100644new mode 100755index 1e270b46e..5fe99dd67--- a/test/agentchat/test_async.py+++ b/test/agentchat/test_async.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport asyncioimport autogendiff --git a/test/agentchat/test_async_chats.py b/test/agentchat/test_async_chats.pyold mode 100644new mode 100755index 31cd9c56e..63b3753f4--- a/test/agentchat/test_async_chats.py+++ b/test/agentchat/test_async_chats.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from autogen import AssistantAgent, UserProxyAgentfrom autogen import GroupChat, GroupChatManagerimport asynciodiff --git a/test/agentchat/test_async_get_human_input.py b/test/agentchat/test_async_get_human_input.pyold mode 100644new mode 100755index 8de6e825d..536762607--- a/test/agentchat/test_async_get_human_input.py+++ b/test/agentchat/test_async_get_human_input.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import asyncioimport osimport sysdiff --git a/test/agentchat/test_chats.py b/test/agentchat/test_chats.pyold mode 100644new mode 100755index 9b6362539..07e279910--- a/test/agentchat/test_chats.py+++ b/test/agentchat/test_chats.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from autogen import AssistantAgent, UserProxyAgentfrom autogen import GroupChat, GroupChatManagerfrom test_assistant_agent import KEY_LOC, OAI_CONFIG_LISTdiff --git a/test/agentchat/test_conversable_agent.py b/test/agentchat/test_conversable_agent.pyold mode 100644new mode 100755index 5247d5162..e55757d14--- a/test/agentchat/test_conversable_agent.py+++ b/test/agentchat/test_conversable_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import asyncioimport copyimport sysdiff --git a/test/agentchat/test_function_call.py b/test/agentchat/test_function_call.pyold mode 100644new mode 100755index 09d17db5e..d5ceccca7--- a/test/agentchat/test_function_call.py+++ b/test/agentchat/test_function_call.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport asyncioimport jsondiff --git a/test/agentchat/test_function_call_groupchat.py b/test/agentchat/test_function_call_groupchat.pyold mode 100644new mode 100755index 40944b200..0217f4cc6--- a/test/agentchat/test_function_call_groupchat.py+++ b/test/agentchat/test_function_call_groupchat.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import autogenimport pytestimport asynciodiff --git a/test/agentchat/test_groupchat.py b/test/agentchat/test_groupchat.pyold mode 100644new mode 100755index 51a4906c0..1c16e6778--- a/test/agentchat/test_groupchat.py+++ b/test/agentchat/test_groupchat.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from typing import Any, Dict, List, Optional, Typefrom autogen import AgentNameConflictimport pytestdiff --git a/test/agentchat/test_human_input.py b/test/agentchat/test_human_input.pyold mode 100644new mode 100755index b9e8fba96..7668c9f67--- a/test/agentchat/test_human_input.py+++ b/test/agentchat/test_human_input.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import autogenimport pytestfrom unittest.mock import MagicMockdiff --git a/test/agentchat/test_math_user_proxy_agent.py b/test/agentchat/test_math_user_proxy_agent.pyold mode 100644new mode 100755index a8a333ec6..6e7a3b5f7--- a/test/agentchat/test_math_user_proxy_agent.py+++ b/test/agentchat/test_math_user_proxy_agent.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport sysimport osdiff --git a/test/agentchat/test_nested.py b/test/agentchat/test_nested.pyold mode 100644new mode 100755index 821a5cbc9..7addbe2c1--- a/test/agentchat/test_nested.py+++ b/test/agentchat/test_nested.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport sysimport osdiff --git a/test/agentchat/test_tool_calls.py b/test/agentchat/test_tool_calls.pyold mode 100644new mode 100755index 21596cedd..e6395463b--- a/test/agentchat/test_tool_calls.py+++ b/test/agentchat/test_tool_calls.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import inspectimport pytestimport jsondiff --git a/test/cache/test_cache.py b/test/cache/test_cache.pyold mode 100644new mode 100755index ba1a0befe..04c12e4ff--- a/test/cache/test_cache.py+++ b/test/cache/test_cache.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import unittestfrom unittest.mock import patch, MagicMockfrom autogen.cache.cache import Cachediff --git a/test/cache/test_disk_cache.py b/test/cache/test_disk_cache.pyold mode 100644new mode 100755index a8f824058..43879eb24--- a/test/cache/test_disk_cache.py+++ b/test/cache/test_disk_cache.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import unittestfrom unittest.mock import patch, MagicMockfrom autogen.cache.disk_cache import DiskCachediff --git a/test/cache/test_redis_cache.py b/test/cache/test_redis_cache.pyold mode 100644new mode 100755index d40fc9459..95f220729--- a/test/cache/test_redis_cache.py+++ b/test/cache/test_redis_cache.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import unittestimport picklefrom unittest.mock import patch, MagicMockdiff --git a/test/oai/_test_completion.py b/test/oai/_test_completion.pyold mode 100644new mode 100755index b13cae515..6a26629a8--- a/test/oai/_test_completion.py+++ b/test/oai/_test_completion.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import datasetsimport sysimport numpy as npdiff --git a/test/oai/test_client.py b/test/oai/test_client.pyold mode 100644new mode 100755index 77b69cb71..947445d23--- a/test/oai/test_client.py+++ b/test/oai/test_client.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import shutilimport timeimport pytestdiff --git a/test/oai/test_client_stream.py b/test/oai/test_client_stream.pyold mode 100644new mode 100755index af0382449..92e249dfd--- a/test/oai/test_client_stream.py+++ b/test/oai/test_client_stream.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import jsonfrom typing import Any, Dict, List, Literal, Optional, Unionfrom unittest.mock import MagicMockdiff --git a/test/oai/test_utils.py b/test/oai/test_utils.pyold mode 100644new mode 100755index 0d0bb2c79..b69958739--- a/test/oai/test_utils.py+++ b/test/oai/test_utils.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import jsonimport loggingimport osdiff --git a/test/test_browser_utils.py b/test/test_browser_utils.pyold mode 100644new mode 100755index 8b8759708..ffcaca40c--- a/test/test_browser_utils.py+++ b/test/test_browser_utils.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import pytestimport osimport sysdiff --git a/test/test_code_utils.py b/test/test_code_utils.pyold mode 100644new mode 100755index be6c61166..e39098481--- a/test/test_code_utils.py+++ b/test/test_code_utils.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import osimport tempfileimport unittestdiff --git a/test/test_notebook.py b/test/test_notebook.pyold mode 100644new mode 100755index 2fd6c8a65..5399abf4a--- a/test/test_notebook.py+++ b/test/test_notebook.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+import sysimport osimport pytestdiff --git a/test/test_retrieve_utils.py b/test/test_retrieve_utils.pyold mode 100644new mode 100755index ba7485f5f..c2ade2352--- a/test/test_retrieve_utils.py+++ b/test/test_retrieve_utils.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+"""Unit test for retrieve_utils.py"""diff --git a/test/test_token_count.py b/test/test_token_count.pyold mode 100644new mode 100755index 444611db0..aa9175ca8--- a/test/test_token_count.py+++ b/test/test_token_count.py@@ -1,3 +1,5 @@+#!/usr/bin/env python3 -m pytest+from autogen.token_count_utils import (count_token,num_tokens_from_functions,