Skip to content

Commit e3598c2

Browse files
committed
Use pytest
1 parent 39fecbd commit e3598c2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ jobs:
6969
CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename
7070
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel}
7171
CIBW_SKIP: "*-musllinux*"
72-
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m unittest discover -t {project} -s tests && mv {project}/av.disabled {project}/av
73-
CIBW_TEST_REQUIRES: numpy
72+
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av
73+
CIBW_TEST_REQUIRES: pytest numpy
7474
# skip tests when there are no binary wheels of numpy
7575
CIBW_TEST_SKIP: pp* *_i686
7676
run: |

tests/test_videoframe.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ def test_basic_to_ndarray() -> None:
174174

175175

176176
def test_to_image_with_dimensions() -> None:
177+
if not has_pillow:
178+
pytest.skip()
179+
177180
img = VideoFrame(640, 480, format="rgb24").to_image(width=320, height=240)
178181
assert img.size == (320, 240)
179182

0 commit comments

Comments
 (0)