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

@@ -24,7 +24,6 @@ TEST_RUN_SCRIPT = "examples/cli_example_1.py"
def runner() -> CliRunner:
return CliRunner()
from osxphotos.cli import (
about,
albums,
@@ -42,10 +41,14 @@ from osxphotos.cli import (
places,
theme,
tutorial,
uuid,
version,
)
from osxphotos.utils import is_macos
if is_macos:
from osxphotos.cli import uuid
def test_about(runner: CliRunner):
with runner.isolated_filesystem():
@@ -68,9 +71,8 @@ def test_about(runner: CliRunner):
persons,
places,
tutorial,
uuid,
version,
],
] + ([uuid] if is_macos else []),
)
def test_cli_comands(runner: CliRunner, command: Callable[..., Any]):
with runner.isolated_filesystem():