Tentative fix for resolve_fraction_unit ZeroDivision error

I'll admit to not really following what the code does, so will really need
someone with a better understanding of the aim of this code to look over the
proposed fix; but based on a bunch of runs and hand-debugging, this seems to
do the job.

This passes all existing tests and also removes the reported error.

On the other hand I'm not confident that I'm *not* just masking an
underlying issue with this function.
This commit is contained in:
Dave Pearson
2023-05-09 10:38:09 +01:00
parent a5cc96cbc7
commit a77dbf4bee
2 changed files with 2 additions and 5 deletions

View File

@@ -125,9 +125,6 @@ def test_resolve_fraction_unit():
) == Fraction(2)
@pytest.mark.xfail(
strict=True, reason="https://github.com/Textualize/textual/issues/2502"
)
def test_resolve_issue_2502():
"""Test https://github.com/Textualize/textual/issues/2502"""