From 99c92246920e3a46fa629e570af23337f33610b0 Mon Sep 17 00:00:00 2001 From: Diane Napolitano Date: Thu, 1 Aug 2024 11:18:25 -0400 Subject: [PATCH] Fixing tests/models/test_nonparametric_election_model.py::test_aggregation_simple unit test because it seems like the order of the merge is based on the c1 column? --- tests/models/test_nonparametric_election_model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/models/test_nonparametric_election_model.py b/tests/models/test_nonparametric_election_model.py index 7688eea9..4f9373b3 100644 --- a/tests/models/test_nonparametric_election_model.py +++ b/tests/models/test_nonparametric_election_model.py @@ -206,10 +206,10 @@ def test_aggregation_simple(): df3 = model._get_reporting_aggregate_votes(df1, df2, aggregate=["c1", "c2"], estimand=estimand) assert pd.DataFrame( { - "c1": ["a", "a", "b", "b", "a", "d"], - "c2": ["x", "y", "y", "z", "w", "t"], - f"results_{estimand}": [5.0, 9.0, 1.0, 15.0, 5.0, 1.0], - "reporting": [2.0, 1.0, 1.0, 3.0, 1.0, 1.0], + "c1": ["a", "a", "a", "b", "b", "d"], + "c2": ["w", "x", "y", "y", "z", "t"], + f"results_{estimand}": [5.0, 5.0, 9.0, 1.0, 15.0, 1.0], + "reporting": [1.0, 2.0, 1.0, 1.0, 3.0, 1.0], } ).equals(df3)