Skip to content

Commit

Permalink
Fixing tests/models/test_nonparametric_election_model.py::test_aggreg…
Browse files Browse the repository at this point in the history
…ation_simple unit test because it seems like the order of the merge is based on the c1 column?
  • Loading branch information
dmnapolitano committed Aug 1, 2024
1 parent 56b730a commit 99c9224
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/models/test_nonparametric_election_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 99c9224

Please sign in to comment.