Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Fixed tests

Dillon DuPontf00d94e81ddd
diff --git a/libs/computer/computer/interface/windows.py b/libs/computer/computer/interface/windows.py
index 62038a919c..7f471e7a57 100644
--- a/libs/computer/computer/interface/windows.py
+++ b/libs/computer/computer/interface/windows.py
@@ -9,8 +9,7 @@ import websockets
from ..logger import Logger, LogLevel
from .base import BaseComputerInterface
from ..utils import decode_base64_image, encode_base64_image, bytes_to_image, draw_box, resize_image
-from ..models import Computer, CommandResult, Key, KeyType, MouseButton
-
+from .models import Key, KeyType, MouseButton, CommandResult
class WindowsComputerInterface(BaseComputerInterface):
"""Interface for Windows."""
diff --git a/tests/files.py b/tests/files.py
index 388b7656d8..236ef9e2af 100644
--- a/tests/files.py
+++ b/tests/files.py
@@ -28,24 +28,24 @@ for path in pythonpath.split(":"):
sys.path.insert(0, path) # Insert at beginning to prioritize
print(f"Added to sys.path: {path}")
-from computer.computer import Computer
+from computer import Computer, VMProviderType
@pytest.fixture(scope="session")
async def computer():
"""Shared Computer instance for all test cases."""
- # # Create a remote Linux computer with C/ua
- # computer = Computer(
- # os_type="linux",
- # api_key=os.getenv("CUA_API_KEY"),
- # name=str(os.getenv("CUA_CONTAINER_NAME")),
- # provider_type=VMProviderType.CLOUD,
- # )
+ # Create a remote Linux computer with C/ua
+ computer = Computer(
+ os_type="linux",
+ api_key=os.getenv("CUA_API_KEY"),
+ name=str(os.getenv("CUA_CONTAINER_NAME")),
+ provider_type=VMProviderType.CLOUD,
+ )
# Create a local macOS computer with C/ua
# computer = Computer()
# Connect to host computer
- computer = Computer(use_host_computer_server=True)
+ # computer = Computer(use_host_computer_server=True)
try:
await computer.run()
diff --git a/tests/venv.py b/tests/venv.py
index 7097c2fd32..522a47270f 100644
--- a/tests/venv.py
+++ b/tests/venv.py
@@ -29,24 +29,23 @@ for path in pythonpath.split(":"):
sys.path.insert(0, path) # Insert at beginning to prioritize
print(f"Added to sys.path: {path}")
-from computer.computer import Computer
-from computer.providers.base import VMProviderType
+from computer import Computer, VMProviderType
from computer.helpers import sandboxed, set_default_computer
@pytest.fixture(scope="session")
async def computer():
"""Shared Computer instance for all test cases."""
- # # Create a remote Linux computer with C/ua
- # computer = Computer(
- # os_type="linux",
- # api_key=os.getenv("CUA_API_KEY"),
- # name=str(os.getenv("CUA_CONTAINER_NAME")),
- # provider_type=VMProviderType.CLOUD,
- # )
-
- # Create a local macOS computer with C/ua
- computer = Computer()
+ # Create a remote Linux computer with C/ua
+ computer = Computer(
+ os_type="linux",
+ api_key=os.getenv("CUA_API_KEY"),
+ name=str(os.getenv("CUA_CONTAINER_NAME")),
+ provider_type=VMProviderType.CLOUD,
+ )
+
+ # # Create a local macOS computer with C/ua
+ # computer = Computer()
try:
await computer.run()