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:
@@ -1,6 +1,8 @@
|
||||
""" test datetime_formatter.DateTimeFormatter """
|
||||
import pytest
|
||||
|
||||
from .locale_util import setlocale
|
||||
|
||||
|
||||
def test_datetime_formatter_1():
|
||||
"""Test DateTimeFormatter """
|
||||
@@ -8,7 +10,7 @@ def test_datetime_formatter_1():
|
||||
import locale
|
||||
from osxphotos.datetime_formatter import DateTimeFormatter
|
||||
|
||||
locale.setlocale(locale.LC_ALL, "en_US")
|
||||
setlocale(locale.LC_ALL, "en_US")
|
||||
|
||||
dt = datetime.datetime(2020, 5, 23, 12, 42, 33)
|
||||
dtf = DateTimeFormatter(dt)
|
||||
@@ -32,7 +34,7 @@ def test_datetime_formatter_2():
|
||||
import locale
|
||||
from osxphotos.datetime_formatter import DateTimeFormatter
|
||||
|
||||
locale.setlocale(locale.LC_ALL, "en_US")
|
||||
setlocale(locale.LC_ALL, "en_US")
|
||||
|
||||
dt = datetime.datetime(2020, 5, 23, 14, 42, 33)
|
||||
dtf = DateTimeFormatter(dt)
|
||||
@@ -56,7 +58,7 @@ def test_datetime_formatter_3():
|
||||
import locale
|
||||
from osxphotos.datetime_formatter import DateTimeFormatter
|
||||
|
||||
locale.setlocale(locale.LC_ALL, "en_US")
|
||||
setlocale(locale.LC_ALL, "en_US")
|
||||
|
||||
dt = datetime.datetime(2020, 5, 2, 9, 3, 6)
|
||||
dtf = DateTimeFormatter(dt)
|
||||
|
||||
Reference in New Issue
Block a user