🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
fix: pydutogui test (#2197)
Wendong-Fan8474e26dcf9a
diff --git a/test/toolkits/test_pyautogui_toolkit.py b/test/toolkits/test_pyautogui_toolkit.pyindex 60f9caf7b..3e8e1ce21 100644--- a/test/toolkits/test_pyautogui_toolkit.py+++ b/test/toolkits/test_pyautogui_toolkit.py@@ -15,7 +15,25 @@import osfrom unittest.mock import MagicMock, patch-from camel.toolkits.pyautogui_toolkit import PyAutoGUIToolkit+import pytest++# Try importing PyAutoGUIToolkit, skip tests if it or its dependencies fail+# This commonly happens in headless environments where 'DISPLAY' is not set.+try:+ import pyautogui # noqa: F401++ from camel.toolkits import PyAutoGUIToolkit++ pyautogui_functional = True+except (ImportError, KeyError, RuntimeError):+ pyautogui_functional = False++# Skip all tests in this module if pyautogui isn't functional+pytestmark = pytest.mark.skipif(+ not pyautogui_functional,+ reason="PyAutoGUI is not installed or not functional in this "+ "environment (e.g., headless)",+)def test_initialization():