summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_natsorted.py4
-rw-r--r--tests/test_parse_number_function.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_natsorted.py b/tests/test_natsorted.py
index e4a4788..bd1cc39 100644
--- a/tests/test_natsorted.py
+++ b/tests/test_natsorted.py
@@ -113,8 +113,8 @@ def test_natsorted_handles_mixed_types(
@pytest.mark.parametrize(
"alg, expected",
[
- (ns.DEFAULT, [None, float("nan"), float("-inf"), 5, "25", 1e40, float("inf")]),
- (ns.NANLAST, [float("-inf"), 5, "25", 1e40, None, float("nan"), float("inf")]),
+ (ns.DEFAULT, [float("nan"), None, float("-inf"), 5, "25", 1e40, float("inf")]),
+ (ns.NANLAST, [float("-inf"), 5, "25", 1e40, float("inf"), None, float("nan")]),
],
)
def test_natsorted_consistent_ordering_with_nan_and_friends(
diff --git a/tests/test_parse_number_function.py b/tests/test_parse_number_function.py
index 5ac5700..24ee714 100644
--- a/tests/test_parse_number_function.py
+++ b/tests/test_parse_number_function.py
@@ -35,17 +35,17 @@ def test_parse_number_factory_makes_function_that_returns_tuple(
(
ns.DEFAULT,
float("nan"),
- ("", float("-inf"), "2"),
+ ("", float("-inf"), "1"),
), # NaN transformed to -infinity
(
ns.NANLAST,
float("nan"),
- ("", float("+inf"), "2"),
+ ("", float("+inf"), "3"),
), # NANLAST makes it +infinity
- (ns.DEFAULT, None, ("", float("-inf"), "1")), # None transformed to -infinity
- (ns.NANLAST, None, ("", float("+inf"), "1")), # NANLAST makes it +infinity
+ (ns.DEFAULT, None, ("", float("-inf"), "2")), # None transformed to -infinity
+ (ns.NANLAST, None, ("", float("+inf"), "2")), # NANLAST makes it +infinity
(ns.DEFAULT, float("-inf"), ("", float("-inf"), "3")),
- (ns.NANLAST, float("+inf"), ("", float("+inf"), "3")),
+ (ns.NANLAST, float("+inf"), ("", float("+inf"), "1")),
],
)
def test_parse_number_factory_treats_nan_and_none_special(