File tree 3 files changed +42
-5
lines changed
3 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -28,24 +28,24 @@ test: test-unit test-integration-docker
28
28
29
29
.PHONY : test-unit
30
30
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"
32
32
33
33
.PHONY : test-contract
34
34
test-contract :
35
- PYTHONPATH=. poetry run pytest _test_contract -v
35
+ PYTHONPATH=. poetry run pytest -n auto _test_contract -v
36
36
37
37
# Assumes you have unstructured-api running on localhost:8000
38
38
.PHONY : test-integration
39
39
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"
41
41
42
42
# Runs the unstructured-api in docker for tests
43
43
.PHONY : test-integration-docker
44
44
test-integration-docker :
45
45
-docker stop unstructured-api && docker kill unstructured-api
46
46
docker run --name unstructured-api -p 8000:8000 -d --rm ${DOCKER_IMAGE} --host 0.0.0.0 && \
47
47
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" && \
49
49
docker kill unstructured-api
50
50
51
51
.PHONY : lint
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ types-aiofiles = ">=24.1.0"
43
43
uvloop = " >=0.20.0"
44
44
pytest-httpx = " >=0.35.0"
45
45
unstructured = " >= 0.17.2"
46
+ pytest-xdist = " ^3.5.0"
46
47
47
48
[build-system ]
48
49
requires = [" poetry-core" ]
You can’t perform that action at this time.
0 commit comments