Updated tests to run in GitHub actions
This commit is contained in:
@@ -840,6 +840,10 @@ def test_export_edited_suffix():
|
||||
assert sorted(files) == sorted(CLI_EXPORT_FILENAMES_EDITED_SUFFIX)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
"OSXPHOTOS_TEST_CONVERT" not in os.environ,
|
||||
reason="Skip if running in Github actions, no GPU.",
|
||||
)
|
||||
def test_export_convert_to_jpeg():
|
||||
""" test --convert-to-jpeg """
|
||||
import glob
|
||||
@@ -862,6 +866,10 @@ def test_export_convert_to_jpeg():
|
||||
assert large_file.stat().st_size > 10000000
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
"OSXPHOTOS_TEST_CONVERT" not in os.environ,
|
||||
reason="Skip if running in Github actions, no GPU.",
|
||||
)
|
||||
def test_export_convert_to_jpeg_quality():
|
||||
""" test --convert-to-jpeg --jpeg-quality """
|
||||
import glob
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from osxphotos._constants import _UNKNOWN_PERSON
|
||||
|
||||
skip_test = "OSXPHOTOS_TEST_CONVERT" not in os.environ
|
||||
pytestmark = pytest.mark.skipif(
|
||||
skip_test, reason="Skip if running on GitHub actions, no GPU."
|
||||
)
|
||||
|
||||
PHOTOS_DB = "tests/Test-10.15.6.photoslibrary"
|
||||
|
||||
UUID_DICT = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
""" test FileUtil """
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
TEST_HEIC = "tests/test-images/IMG_3092.heic"
|
||||
@@ -72,6 +73,10 @@ def test_unlink_file():
|
||||
assert not os.path.isfile(dest)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
"OSXPHOTOS_TEST_CONVERT" not in os.environ,
|
||||
reason="Skip if running in Github actions, no GPU.",
|
||||
)
|
||||
def test_convert_to_jpeg():
|
||||
""" test convert_to_jpeg """
|
||||
import pathlib
|
||||
@@ -85,7 +90,10 @@ def test_convert_to_jpeg():
|
||||
assert FileUtil.convert_to_jpeg(imgfile, outfile)
|
||||
assert outfile.is_file()
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
"OSXPHOTOS_TEST_CONVERT" not in os.environ,
|
||||
reason="Skip if running in Github actions, no GPU.",
|
||||
)
|
||||
def test_convert_to_jpeg_quality():
|
||||
""" test convert_to_jpeg with compression_quality """
|
||||
import pathlib
|
||||
|
||||
Reference in New Issue
Block a user