Skip to content

Commit 4f14015

Browse files
Update osworld to be skipped if desktop_env not available
1 parent d2d59bc commit 4f14015

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/benchmarks/test_osworld.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
import pytest
66

7+
# Check if desktop_env is available
8+
try:
9+
import desktop_env
10+
11+
DESKTOP_ENV_AVAILABLE = True
12+
except ImportError:
13+
DESKTOP_ENV_AVAILABLE = False
14+
15+
# Skip the entire module if desktop_env is not available
16+
pytestmark = pytest.mark.skipif(not DESKTOP_ENV_AVAILABLE, reason="desktop_env not installed")
17+
718
from agentlab.benchmarks.osworld import (
819
OSWorldActionSet,
920
OsworldEnvArgs,

0 commit comments

Comments
 (0)