mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-31 11:13:08 +03:00
Fix tests
This commit is contained in:
parent
83de8cd22c
commit
b15c019ffc
|
@ -1,6 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from fractions import Fraction
|
||||
import math
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
@ -84,4 +85,8 @@ def test_ifd_rational_save(
|
|||
],
|
||||
)
|
||||
def test_float_cast(numerator, denominator, expected_result):
|
||||
float(IFDRational(numerator, denominator)) == expected_result
|
||||
value = float(IFDRational(numerator, denominator))
|
||||
if math.isnan(expected_result):
|
||||
assert value
|
||||
else:
|
||||
assert value == expected_result
|
||||
|
|
Loading…
Reference in New Issue
Block a user