Skip to content

Commit

Permalink
moved pytest options to pyproject.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Jul 17, 2023
1 parent 52a6879 commit 52dd4c5
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-src-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ jobs:
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"

- name: Run Tests
run: python3 -m pytest -rs
run: python3 -m pytest
4 changes: 2 additions & 2 deletions .github/workflows/test-src-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"

- name: Perform tests
run: python3 -m pytest -rs
run: python3 -m pytest

lite_macos_11:
name: macOS:11-x86_64(Pi-Heif)
Expand Down Expand Up @@ -79,4 +79,4 @@ jobs:
run: python3 -c "import pi_heif; print(pi_heif.libheif_info())"

- name: Perform tests
run: python3 -m pytest -rs
run: python3 -m pytest
4 changes: 2 additions & 2 deletions .github/workflows/test-src-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: python -c "import pillow_heif; print(pillow_heif.libheif_info())"

- name: Perform tests
run: python -m pytest -rs
run: python -m pytest

lite_windows_2019:
name: Windows:2019-x86_64(Pi-Heif)
Expand Down Expand Up @@ -117,4 +117,4 @@ jobs:
run: python -c "import pi_heif; print(pi_heif.libheif_info())"

- name: Perform tests
run: python -m pytest -rs
run: python -m pytest
14 changes: 7 additions & 7 deletions .github/workflows/test-wheels-pi_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Test wheel
run: |
python3 .github/transform_to-pi_heif.py
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
macos-wheels:
name: macOS • 11 • ${{ matrix.python-version }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
export TEST_DECODE_THREADS=0
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
manylinux-wheels:
name: Ubuntu-Focal • ${{ matrix.python-version }}
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
run: |
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
macos-projects-together:
name: macOS • Together • ${{ matrix.python-version }}
Expand Down Expand Up @@ -192,11 +192,11 @@ jobs:
run: |
export TEST_DECODE_THREADS=0
export PH_FULL_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
export PH_FULL_ACTION=0 && cd pillow_heif
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
linux-projects-together:
name: Linux • Together • ${{ matrix.python-version }}
Expand Down Expand Up @@ -226,8 +226,8 @@ jobs:
- name: Test wheels
run: |
export PH_FULL_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
export PH_FULL_ACTION=0 && cd pillow_heif
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
6 changes: 3 additions & 3 deletions .github/workflows/test-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
python3 -m pip install --only-binary=:all: pillow_heif
- name: Test wheel
run: cd .. && python3 -m pytest -rs pillow_heif
run: cd .. && python3 -m pytest pillow_heif

macos-wheels:
name: macOS • 11 • ${{ matrix.python-version }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
run: |
export TEST_DECODE_THREADS=0
export PH_FULL_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
manylinux-wheels:
name: Ubuntu-Focal • ${{ matrix.python-version }}
Expand Down Expand Up @@ -160,4 +160,4 @@ jobs:
- name: Test wheel
run: |
export PH_FULL_ACTION=1
cd .. && python3 -m pytest -rs pillow_heif
cd .. && python3 -m pytest pillow_heif
2 changes: 1 addition & 1 deletion .github/workflows/wheels-pi_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ jobs:
- name: Test sdist
run: |
export PH_LIGHT_ACTION=1 TEST_DECODE_THREADS=0
python3 -m pytest -rs
python3 -m pytest
- name: Upload sdist
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels-pillow_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ jobs:
- name: Test sdist
run: |
export PH_FULL_ACTION=1 TEST_DECODE_THREADS=0
python3 -m pytest -rs
python3 -m pytest
- name: Upload sdist
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions ci/cirrus_general_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test_src_build_full_macos_arm_task:
libheif_info_script:
- python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
perform_tests_script:
- python3 -m pytest -rs
- python3 -m pytest

test_src_build_lite_macos_arm_task:
only_if: "changesInclude(
Expand Down Expand Up @@ -54,4 +54,4 @@ test_src_build_lite_macos_arm_task:
libheif_info_script:
- python3 -c "import pi_heif; print(pi_heif.libheif_info())"
perform_tests_script:
- python3 -m pytest -rs
- python3 -m pytest
2 changes: 1 addition & 1 deletion docker/from_src/Alpine_3_16.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ RUN \
fi && \
echo "**** Build Done ****" && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
pytest -rs pillow_heif && \
pytest pillow_heif && \
echo "**** Test Done ****"
2 changes: 1 addition & 1 deletion docker/from_src/Alpine_3_17.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ RUN \
fi && \
echo "**** Build Done ****" && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
pytest -rs pillow_heif && \
pytest pillow_heif && \
echo "**** Test Done ****"
2 changes: 1 addition & 1 deletion docker/from_src/Alpine_3_18.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ RUN \
fi && \
echo "**** Build Done ****" && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
pytest -rs pillow_heif && \
pytest pillow_heif && \
echo "**** Test Done ****"
2 changes: 1 addition & 1 deletion docker/from_src/Debian_11.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ RUN \
fi && \
echo "**** Build Done ****" && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
pytest -rs pillow_heif && \
pytest pillow_heif && \
echo "**** Test Done ****"
2 changes: 1 addition & 1 deletion docker/from_src/Debian_12.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ RUN \
fi && \
echo "**** Build Done ****" && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
pytest -rs pillow_heif && \
pytest pillow_heif && \
echo "**** Test Done ****"
2 changes: 1 addition & 1 deletion docker/from_src/Ubuntu_22_04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ RUN \
fi && \
echo "**** Build Done ****" && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
pytest -rs pillow_heif && \
pytest pillow_heif && \
echo "**** Test Done ****"
2 changes: 1 addition & 1 deletion docker/manylinux_armv7l_wheels.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ RUN \
python3 -m pip install repaired_dist/*-cp$PTAG-*manylinux*.whl && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
export PH_LIGHT_ACTION=1 && \
python3 -m pytest -rs && \
python3 -m pytest && \
echo "**** Build Done ****"
2 changes: 1 addition & 1 deletion docker/musllinux_armv7l_wheels.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ RUN \
python3 -m pip install repaired_dist/*-cp$PTAG-*musllinux*.whl && \
python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" && \
export PH_LIGHT_ACTION=1 && \
python3 -m pytest -rs && \
python3 -m pytest && \
echo "**** Build Done ****"
2 changes: 1 addition & 1 deletion docker/test_wheels.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ COPY . /pillow_heif

ARG TEST_TYPE
RUN $TEST_TYPE && \
python3 -m pytest -rs -v pillow_heif/. && \
python3 -m pytest -v pillow_heif/. && \
echo "**** Test Done ****" && \
python3 -m pip show pillow_heif
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ testpaths = [
filterwarnings = [
"ignore::DeprecationWarning",
]
addopts = "-rs --color=yes"

[tool.coverage.run]
cover_pylib = true
Expand Down Expand Up @@ -72,7 +73,7 @@ skip = ["cp36-*", "pp37-*", "cp37-musllinux*"]

[tool.cibuildwheel.linux]
test-extras = "tests"
test-command = "pytest -rs {project}"
test-command = "pytest {project}"

[tool.cibuildwheel.macos]
before-all = [
Expand All @@ -87,7 +88,7 @@ repair-wheel-command = [
"DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel -v --require-archs {delocate_archs} -w {dest_dir} {wheel}",
]
test-extras = "tests"
test-command = "pytest -rs {project}"
test-command = "pytest {project}"
test-skip = "cp38-macosx_arm64"

[tool.cibuildwheel.windows]
Expand All @@ -96,4 +97,4 @@ before-build = [
"pip install --prefer-binary pillow",
]
test-extras = "tests"
test-command = "pytest -rs {project}"
test-command = "pytest {project}"

0 comments on commit 52dd4c5

Please sign in to comment.