Skip to content

Commit 659b9a2

Browse files
committed
maybe we can speed up?
1 parent 8ee80c2 commit 659b9a2

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ test: test-unit test-integration-docker
2828

2929
.PHONY: test-unit
3030
test-unit:
31-
PYTHONPATH=. poetry run pytest _test_unstructured_client -v -k "unit"
31+
PYTHONPATH=. poetry run pytest -n auto _test_unstructured_client -v -k "unit"
3232

3333
.PHONY: test-contract
3434
test-contract:
35-
PYTHONPATH=. poetry run pytest _test_contract -v
35+
PYTHONPATH=. poetry run pytest -n auto _test_contract -v
3636

3737
# Assumes you have unstructured-api running on localhost:8000
3838
.PHONY: test-integration
3939
test-integration:
40-
PYTHONPATH=. poetry run pytest _test_unstructured_client -v -k "integration"
40+
PYTHONPATH=. poetry run pytest -n auto _test_unstructured_client -v -k "integration"
4141

4242
# Runs the unstructured-api in docker for tests
4343
.PHONY: test-integration-docker
4444
test-integration-docker:
4545
-docker stop unstructured-api && docker kill unstructured-api
4646
docker run --name unstructured-api -p 8000:8000 -d --rm ${DOCKER_IMAGE} --host 0.0.0.0 && \
4747
curl -s -o /dev/null --retry 10 --retry-delay 5 --retry-all-errors http://localhost:8000/general/docs && \
48-
PYTHONPATH=. poetry run pytest _test_unstructured_client -v -k "integration" && \
48+
PYTHONPATH=. poetry run pytest -n auto _test_unstructured_client -v -k "integration" && \
4949
docker kill unstructured-api
5050

5151
.PHONY: lint

poetry.lock

+37-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ types-aiofiles = ">=24.1.0"
4343
uvloop = ">=0.20.0"
4444
pytest-httpx = ">=0.35.0"
4545
unstructured = ">= 0.17.2"
46+
pytest-xdist = "^3.5.0"
4647

4748
[build-system]
4849
requires = ["poetry-core"]

0 commit comments

Comments
 (0)