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

@@ -74,10 +74,12 @@ def test_hardlink_file_valid():
temp_dir = tempfile.TemporaryDirectory(prefix="osxphotos_")
src = "tests/test-images/wedding.jpg"
src2 = os.path.join(temp_dir.name, "wedding_src.jpg")
dest = os.path.join(temp_dir.name, "wedding.jpg")
FileUtil.hardlink(src, dest)
FileUtil.copy(src, src2)
FileUtil.hardlink(src2, dest)
assert os.path.isfile(dest)
assert os.path.samefile(src, dest)
assert os.path.samefile(src2, dest)
def test_unlink_file():