Merge PR #802: test: parallelize test suite with pytest-xdist
Adds pytest-xdist to dev dependencies and -n auto to default pytest addopts for parallel test execution across CPU cores. Authored by OutThisLife. Co-authored-by: OutThisLife <OutThisLife@users.noreply.github.com>
This commit is contained in:
commit
1dfa544250
2 changed files with 3 additions and 3 deletions
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
python -m pytest tests/ -q --ignore=tests/integration --tb=short
|
python -m pytest tests/ -q --ignore=tests/integration --tb=short -n auto
|
||||||
env:
|
env:
|
||||||
# Ensure tests don't accidentally call real APIs
|
# Ensure tests don't accidentally call real APIs
|
||||||
OPENROUTER_API_KEY: ""
|
OPENROUTER_API_KEY: ""
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ dependencies = [
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
modal = ["swe-rex[modal]>=1.4.0"]
|
modal = ["swe-rex[modal]>=1.4.0"]
|
||||||
daytona = ["daytona>=0.148.0"]
|
daytona = ["daytona>=0.148.0"]
|
||||||
dev = ["pytest", "pytest-asyncio", "mcp>=1.2.0"]
|
dev = ["pytest", "pytest-asyncio", "pytest-xdist", "mcp>=1.2.0"]
|
||||||
messaging = ["python-telegram-bot>=20.0", "discord.py>=2.0", "aiohttp>=3.9.0", "slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
messaging = ["python-telegram-bot>=20.0", "discord.py>=2.0", "aiohttp>=3.9.0", "slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
||||||
cron = ["croniter"]
|
cron = ["croniter"]
|
||||||
slack = ["slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
slack = ["slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
||||||
|
|
@ -84,4 +84,4 @@ testpaths = ["tests"]
|
||||||
markers = [
|
markers = [
|
||||||
"integration: marks tests requiring external services (API keys, Modal, etc.)",
|
"integration: marks tests requiring external services (API keys, Modal, etc.)",
|
||||||
]
|
]
|
||||||
addopts = "-m 'not integration'"
|
addopts = "-m 'not integration' -n auto"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue