Skip to content

Commit

Permalink
Minor edits.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinevans committed Aug 14, 2024
1 parent 06e9090 commit 30bcba1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions improver_tests/wxcode/wxcode/test_ModalFromGroupings.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_expected_values(wxcode_series, expected):
# A wet bias of 2 means that at least 1/(1+2) * 10 = 3.33 codes must be wet
# in order to produce a wet code. As 3 codes are wet, a dry code is produced.
([1, 3, 4, 5, 7, 8, 8, 10, 10, 10], 2, 8, False, False),
# A wet bias of 2 means that at least 1/(1+3) * 10 = 2.5 codes must be wet
# A wet bias of 3 means that at least 1/(1+3) * 10 = 2.5 codes must be wet
# in order to produce a wet code. As 3 codes are wet, a wet code is produced.
([1, 3, 4, 5, 7, 8, 8, 10, 10, 10], 3, 10, False, False),
# A wet bias of 2 means that at least 1/(1+2) * 10 = 3.33 codes must be wet
Expand Down Expand Up @@ -324,12 +324,15 @@ def test_expected_values_ignore_intensity(
):
"""Test that the expected period representative symbol is returned."""
_, _, _, _, wxcode_cubes = wxcode_series
intensity_categories = INTENSITY_CATEGORIES.copy()
if reverse_intensity_dict:
intensity_categories = {}
for key in INTENSITY_CATEGORIES.keys():
intensity_categories[key] = [i for i in reversed(INTENSITY_CATEGORIES[key])]
if not ignore_intensity:
if ignore_intensity:
intensity_categories = INTENSITY_CATEGORIES.copy()
if reverse_intensity_dict:
intensity_categories = {}
for key in INTENSITY_CATEGORIES.keys():
intensity_categories[key] = [
i for i in reversed(INTENSITY_CATEGORIES[key])
]
else:
intensity_categories = None
result = ModalFromGroupings(
BROAD_CATEGORIES, WET_CATEGORIES, intensity_categories=intensity_categories,
Expand Down

0 comments on commit 30bcba1

Please sign in to comment.