Set up browser-based end-to-end testing using pytest-playwright: - Add playwright-driver and pytest-playwright to nix flake - Configure PLAYWRIGHT_BROWSERS_PATH for NixOS compatibility - Create ServerHarness to manage live server for tests - Add smoke tests for health endpoint and page loading - Exclude e2e tests from pre-commit hook (require special setup) Run e2e tests with: pytest tests/e2e/ -v -n 0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
64 lines
1.3 KiB
TOML
64 lines
1.3 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "animaltrack"
|
|
version = "0.1.0"
|
|
description = "Event-sourced animal tracking for poultry farm management"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
authors = [
|
|
{name = "ppetru"}
|
|
]
|
|
|
|
dependencies = [
|
|
"python-fasthtml>=0.12.0",
|
|
"monsterui>=1.0.0",
|
|
"uvicorn>=0.24.0",
|
|
"fastmigrate>=0.4.0",
|
|
"pydantic>=2.0.0",
|
|
"pydantic-settings>=2.0.0",
|
|
"python-ulid>=2.0.0",
|
|
"xxhash>=3.0.0",
|
|
"python-multipart>=0.0.6",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=7.4.0",
|
|
"pytest-xdist>=3.5.0",
|
|
"pytest-playwright>=0.4.0",
|
|
"requests>=2.31.0",
|
|
"ruff>=0.1.0",
|
|
"filelock>=3.13.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
animaltrack = "animaltrack.cli:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.setuptools.package-data]
|
|
animaltrack = ["static/**/*"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "N", "W", "UP"]
|
|
ignore = ["E501"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
pythonpath = ["src"]
|
|
python_files = "test_*.py"
|
|
python_classes = "Test*"
|
|
python_functions = "test_*"
|
|
addopts = "--durations=20 -n auto"
|
|
markers = [
|
|
"e2e: end-to-end browser tests (run with -n 0 to disable parallel execution)",
|
|
]
|