Fix tests

This commit is contained in:
Andras Schmelczer 2022-07-24 20:28:24 +02:00
parent e8b07b4f5a
commit 1c73ac03e4
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E

View file

@ -16,7 +16,7 @@ def test_default() -> None:
reverse_order=True,
)
assert results == {"d": 1.0, "c": 0.6666666666666666, "b": 0.4}
assert results == {"d": 5 / 6, "c": 2 / 3, "b": 2 / 5}
results = evaluate_ranking(
["a", "a", "b", "b", "c", "d", "d", "d"],
@ -26,11 +26,7 @@ def test_default() -> None:
disable_interpolation=True,
)
assert results == {
"a": 0.6666666666666666,
"b": 0.3333333333333333,
"c": 0.2857142857142857,
}
assert results == {"a": 0.6, "b": 0.4, "c": 0.2}
def test_mismatching_lengths() -> None: