Port to non-MacOS platforms (#1026)

* Port to non-MacOS platforms

* Keep NFD normalization on macOS

* Update locale_util.py

Fix lint error from ruff (runs in CI)

* Update query.py

click.Option first arg needs to be a list (different than click.option)

* Dynamically normalize Unicode paths in test

* Fix missing import

---------

Co-authored-by: Rhet Turnbull <rturnbull@gmail.com>
This commit is contained in:
dvdkon
2023-05-07 15:55:56 +02:00
committed by GitHub
parent 0c85298c03
commit ca3da647f2
51 changed files with 726 additions and 360 deletions

View File

@@ -1,10 +1,14 @@
"""Test osxphotos add-locations command"""
import photoscript
import pytest
from click.testing import CliRunner
from osxphotos.cli.add_locations import add_locations
from osxphotos.utils import is_macos
if is_macos:
import photoscript
from osxphotos.cli.add_locations import add_locations
else:
pytest.skip(allow_module_level=True)
UUID_TEST_PHOTO_1 = "F12384F6-CD17-4151-ACBA-AE0E3688539E" # Pumkins1.jpg
UUID_TEST_PHOTO_LOCATION = "D79B8D77-BFFC-460B-9312-034F2877D35B" # Pumkins2.jpg