summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth M Morton <seth.m.morton@gmail.com>2018-09-02 23:22:47 -0700
committerSeth M Morton <seth.m.morton@gmail.com>2018-09-02 23:22:47 -0700
commit478cc5b88984b572e86421e6567e8b425e3d039e (patch)
treef945546a1bbd357cdf4d6e30a91318a62f445c5a
parent5e8bb322f20b689345e0d4be21731f910ea6df5e (diff)
downloadnatsort-478cc5b88984b572e86421e6567e8b425e3d039e.tar.gz
Attempt to fix locale/PyICU inconsistency.
The ordering of accented A's and a's was not the same between them - the accent has been made the same in an attempt to improve the situation.
-rw-r--r--test_natsort/test_natsorted.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/test_natsort/test_natsorted.py b/test_natsort/test_natsorted.py
index b9c8c04..e78fc8b 100644
--- a/test_natsort/test_natsorted.py
+++ b/test_natsort/test_natsorted.py
@@ -25,7 +25,7 @@ def fruit_list():
@pytest.fixture
def mixed_list():
- return ["Á", "0", "ä", 3, "b", 1.5, "2", "Z"]
+ return ["Ä", "0", "ä", 3, "b", 1.5, "2", "Z"]
def test_natsorted_numbers_in_ascending_order():
@@ -80,8 +80,8 @@ def test_natsorted_can_sort_as_version_numbers(alg):
@pytest.mark.parametrize(
"alg, expected",
[
- (ns.DEFAULT, ["0", 1.5, "2", 3, "Á", "Z", "ä", "b"]),
- (ns.NUMAFTER, ["Á", "Z", "ä", "b", "0", 1.5, "2", 3]),
+ (ns.DEFAULT, ["0", 1.5, "2", 3, "Ä", "Z", "ä", "b"]),
+ (ns.NUMAFTER, ["Ä", "Z", "ä", "b", "0", 1.5, "2", 3]),
],
)
def test_natsorted_handles_mixed_types(mixed_list, alg, expected):
@@ -223,15 +223,15 @@ def test_natsorted_can_sort_locale_specific_numbers_de():
@pytest.mark.parametrize(
"alg, expected",
[
- (ns.DEFAULT, ["0", 1.5, "2", 3, "ä", "Á", "b", "Z"]),
- (ns.NUMAFTER, ["ä", "Á", "b", "Z", "0", 1.5, "2", 3]),
- (ns.UNGROUPLETTERS, ["0", 1.5, "2", 3, "Á", "Z", "ä", "b"]),
- (ns.UG | ns.NA, ["Á", "Z", "ä", "b", "0", 1.5, "2", 3]),
+ (ns.DEFAULT, ["0", 1.5, "2", 3, "ä", "Ä", "b", "Z"]),
+ (ns.NUMAFTER, ["ä", "Ä", "b", "Z", "0", 1.5, "2", 3]),
+ (ns.UNGROUPLETTERS, ["0", 1.5, "2", 3, "Ä", "Z", "ä", "b"]),
+ (ns.UG | ns.NA, ["Ä", "Z", "ä", "b", "0", 1.5, "2", 3]),
# Adding PATH changes nothing.
- (ns.PATH, ["0", 1.5, "2", 3, "ä", "Á", "b", "Z"]),
- (ns.PATH | ns.NUMAFTER, ["ä", "Á", "b", "Z", "0", 1.5, "2", 3]),
- (ns.PATH | ns.UNGROUPLETTERS, ["0", 1.5, "2", 3, "Á", "Z", "ä", "b"]),
- (ns.PATH | ns.UG | ns.NA, ["Á", "Z", "ä", "b", "0", 1.5, "2", 3]),
+ (ns.PATH, ["0", 1.5, "2", 3, "ä", "Ä", "b", "Z"]),
+ (ns.PATH | ns.NUMAFTER, ["ä", "Ä", "b", "Z", "0", 1.5, "2", 3]),
+ (ns.PATH | ns.UNGROUPLETTERS, ["0", 1.5, "2", 3, "Ä", "Z", "ä", "b"]),
+ (ns.PATH | ns.UG | ns.NA, ["Ä", "Z", "ä", "b", "0", 1.5, "2", 3]),
],
)
@pytest.mark.usefixtures("with_locale_en_us")