Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hussain-jafari committed Nov 1, 2024
1 parent c3ad123 commit 33e45a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/pseudopeople/constants/data_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"White": -0.0188,
}

# mypy cannot currently type pd.Interval (11/01/24)
DO_NOT_RESPOND_AGE_INTERVALS: list[pd.Interval] = [ # type: ignore [type-arg]
# Intervals should include their lower bound
pd.Interval(0, 5, closed="left"),
Expand Down
2 changes: 1 addition & 1 deletion src/pseudopeople/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from collections.abc import Sequence
from pathlib import Path
from typing import Any, Iterable, Literal, cast
from typing import Any, Literal, cast

import pandas as pd
from loguru import logger
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,8 @@ def test_two_d_array_choice(
# Assert proportions
for sport in best_sports:
num_choices = 3 if sport != "Baseball" else 2
explicit_idx = options.index == sport
cols_to_include = options.loc[sport].notna().index.tolist()
teams = options.loc[explicit_idx, cols_to_include].values.flatten()
# drop NaNs from possible teams
teams = [col for col in options.loc[sport] if isinstance(col, str)]
for team in teams:
fuzzy_checker.fuzzy_assert_proportion(
name="test_two_d_array_choice",
Expand Down

0 comments on commit 33e45a0

Please sign in to comment.