-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
79 lines (72 loc) · 3.03 KB
/
Copy pathpyproject.toml
File metadata and controls
79 lines (72 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[project]
name = "open-webui-tests"
version = "0.1.0"
description = "External test suite for Open WebUI — unit (source-level), API integration, and end-to-end browser tests"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
dependencies = [
"pytest~=8.4.1",
"pytest-asyncio>=0.23.0",
"pytest-playwright>=0.5.0",
"playwright==1.49.1",
"pytest-html>=4.0.0",
"allure-pytest>=2.13.0",
"httpx==0.28.1",
"python-dotenv>=1.0.0",
]
# This is a test suite, not an importable library: tell setuptools there
# are no packages to build so `pip install -e .` installs deps + metadata
# without choking on the flat unit/ integration/ e2e/ layout.
[tool.setuptools]
py-modules = []
[project.optional-dependencies]
# Embedded PostgreSQL for the migration tests that run against a real
# postgres (unit/migrations/*). Tests skip cleanly when it's absent.
postgres = [
"pgserver>=0.1.4",
]
dev = [
"ruff>=0.1.0",
"mypy>=1.0.0",
"pgserver>=0.1.4",
]
[tool.pytest.ini_options]
testpaths = ["unit", "integration", "e2e"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Tests opt in with an explicit @pytest.mark.asyncio (strict mode).
asyncio_mode = "strict"
markers = [
# ── purpose ────────────────────────────────────────────────────────────
"regression: pinned to a specific upstream issue/PR; fails only if that bug returns",
# ── cost ───────────────────────────────────────────────────────────────
"slow: long-running (comprehensive scans, real postgres boot). Deselect with -m 'not slow'",
# ── scope / auth (browser + API tests) ─────────────────────────────────
"public: public pages, no authentication",
"auth_required: requires an authenticated user session",
"admin_required: requires an admin session",
"api: API-level test via httpx, no browser",
# ── dependency contract tests (unit/deps/) ─────────────────────────────
"depcheck: per-dependency API-surface / usage contract test (run after a bump)",
# ── capability (positive selection; tests also auto-skip when unmet) ────
"requires_source: needs the open-webui backend source checkout (OPEN_WEBUI_SOURCE_DIR)",
"requires_instance: needs a running Open WebUI at OPEN_WEBUI_URL",
"requires_browser: needs Playwright browsers (e2e)",
"requires_postgres: needs the pgserver package (embedded PostgreSQL)",
]
addopts = [
"--tb=short",
"--strict-markers",
"--strict-config",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true