Skip to content

Commit c017394

Browse files
authored
Merge pull request #511 from Labelbox/jt/al-1885
[AL-1885] Update to Pytest Runs
2 parents f88358b + b3395b9 commit c017394

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ jobs:
8484

8585
LABELBOX_TEST_API_KEY_STAGING: ${{ secrets[matrix.staging-key] }}
8686
run: |
87-
tox -e py -- -svvx
87+
tox -e py -- -svv --reruns 5 --reruns-delay 10

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.7
22

3-
RUN pip install pytest pytest-cases
3+
RUN pip install pytest pytest-cases pytest-rerunfailures
44
RUN apt-get -y update
55
RUN apt install -y libsm6 \
66
libxext6 \

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ test-local: build
77
docker run -it -v ${PWD}:/usr/src -w /usr/src \
88
-e LABELBOX_TEST_ENVIRON="local" \
99
-e LABELBOX_TEST_API_KEY_LOCAL=${LABELBOX_TEST_API_KEY_LOCAL} \
10-
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
10+
local/labelbox-python:test pytest $(PATH_TO_TEST)
1111

1212
test-staging: build
1313
docker run -it -v ${PWD}:/usr/src -w /usr/src \
1414
-e LABELBOX_TEST_ENVIRON="staging" \
1515
-e LABELBOX_TEST_API_KEY_STAGING=${LABELBOX_TEST_API_KEY_STAGING} \
16-
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
16+
local/labelbox-python:test pytest $(PATH_TO_TEST)
1717

1818
test-prod: build
1919
docker run -it -v ${PWD}:/usr/src -w /usr/src \
2020
-e LABELBOX_TEST_ENVIRON="prod" \
2121
-e LABELBOX_TEST_API_KEY_PROD=${LABELBOX_TEST_API_KEY_PROD} \
22-
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
22+
local/labelbox-python:test pytest $(PATH_TO_TEST)

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[pytest]
2-
addopts = -s -vv
2+
addopts = -s -vv --reruns 5 --reruns-delay 10
33
markers =
44
slow: marks tests as slow (deselect with '-m "not slow"')

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ deps =
88
-rrequirements.txt
99
pytest < 7.0.0
1010
pytest-cases
11+
pytest-rerunfailures
1112
passenv = LABELBOX_TEST_API_KEY_PROD LABELBOX_TEST_API_KEY_STAGING LABELBOX_TEST_ENVIRON
1213
commands = pytest {posargs}

0 commit comments

Comments
 (0)