Skip to content

Commit

Permalink
Update test_formats.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Oct 24, 2023
1 parent c6ce409 commit 9de0151
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,19 @@ def test_format_number_with_separator(number: Union[int, float, str], x_out: str
assert x == x_out


@pytest.mark.xfail("Doesn't work as well as imagined, we need a better implementation")
@pytest.mark.parametrize("str_number, x_out", [("1e-5", "0.00001")])
# @pytest.mark.xfail("Doesn't work as well as imagined, we need a better implementation")
@pytest.mark.parametrize(
"str_number, x_out",
[
("1e-5", "0.00001"),
("1.5e-5", "0.000015"),
("-1e-5", "-0.00001"),
("-1.5e-5", "-0.000015"),
# ("1e5", "100000"), <- doesn't work
# ("1.5e5", "150000"), <- doesn't work
("150000", "150000"),
],
)
def test_expand_exponential_to_full_string(str_number: str, x_out: str):
x = _expand_exponential_to_full_string(str_number=str_number)
assert x == x_out

0 comments on commit 9de0151

Please sign in to comment.