Skip to content

Commit

Permalink
Merge GH-365/emcee-submit into test/willard
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyWillard committed Nov 25, 2024
2 parents c1450c0 + 6e38dd2 commit b0dea1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flepimop/gempyor_pkg/src/gempyor/shared_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def convert(
if (m := self._regex.match(value)) is None:
self.fail(f"{value!r} is not a valid memory size.", param, ctx)
number, _, _, unit = m.groups()
unit = unit.lower()
unit = self._unit if unit is None else unit.lower()
if unit == self._unit:
result = float(number)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def test_convert_acts_as_identity(unit: str, as_int: bool, number: int | float)
("kb", True, "2tb", 2147483648),
("mb", False, "0.1gb", 0.1 * 1024.0),
("mb", True, "0.1gb", 103),
("gb", False, "4", 4.0),
("gb", True, "4", 4),
("mb", False, "1234.56", 1234.56),
("mb", True, "1234.56", 1235),
),
)
def test_exact_results_for_select_inputs(
Expand Down

0 comments on commit b0dea1d

Please sign in to comment.