Skip to content

Secure, Fast, and Extensible Sandbox runtime for AI agents.

2.8 KB
Raw Blame
# Copyright 2025 The OpenSandbox Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[project]
name = "opensandbox-e2e-tests"
version = "0.1.0"
description = "E2E tests for OpenSandbox Python SDK"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
    { name = "OpenSandbox Team", email = "[email protected]" }
]
dependencies = [
    "pytest>=9.0.3",
    "pytest-asyncio>=0.21.0",
    "pytest-rerunfailures>=13.0",
    "pytest-timeout>=2.1.0",
    "pytest-order>=1.2.0",
    "pydantic>=2.0.0",
    "opensandbox",
    "opensandbox-code-interpreter",
    "opensandbox-cli",
    "redis>=5.0,<6.0",
]

[dependency-groups]
dev = [
    "ruff>=0.14.8",
    "pyright>=1.1.407",
]

[tool.uv]
# This is a test runner project (no importable package); don't try to build/install it.
package = false
constraint-dependencies = [
    "pyjwt>=2.14.0",
]

[tool.uv.sources]
opensandbox = { path = "../../sdks/sandbox/python", editable = true }
opensandbox-code-interpreter = { path = "../../sdks/code-interpreter/python", editable = true }
opensandbox-cli = { path = "../../cli", editable = true }

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
    "-v",
    "-s",
    "--tb=short",
    "--strict-markers",
    "--asyncio-mode=auto",
    "--order-scope=class",
]
markers = [
    "e2e: marks tests as end-to-end tests",
    "slow: marks tests as slow running",
    "order: run tests in specific order",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
timeout = 300
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)s] %(name)s - %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"

[tool.ruff.lint]
select = [
    "E",  # pycodestyle errors
    "W",  # pycodestyle warnings
    "F",  # pyflakes
    "I",  # isort
    "B",  # flake8-bugbear
    "C4", # flake8-comprehensions
    "UP", # pyupgrade
]
ignore = [
    "E501", # line too long, handled by formatter
    "B008", # do not perform function calls in argument defaults
    "C901", # too complex
    "B017", # pytest.raises(Exception) is too broad
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]