mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
test IFDRational equality
This commit is contained in:
parent
78e971913c
commit
9db5266fa7
|
@ -29,6 +29,13 @@ def test_sanity():
|
||||||
_test_equal(1, 2, IFDRational(1, 2))
|
_test_equal(1, 2, IFDRational(1, 2))
|
||||||
|
|
||||||
|
|
||||||
|
def test_ranges():
|
||||||
|
|
||||||
|
for num in range(1, 10):
|
||||||
|
for denom in range(1, 10):
|
||||||
|
assert IFDRational(num, denom) == IFDRational(num, denom)
|
||||||
|
|
||||||
|
|
||||||
def test_nonetype():
|
def test_nonetype():
|
||||||
# Fails if the _delegate function doesn't return a valid function
|
# Fails if the _delegate function doesn't return a valid function
|
||||||
|
|
||||||
|
@ -43,6 +50,12 @@ def test_nonetype():
|
||||||
assert xres and yres
|
assert xres and yres
|
||||||
|
|
||||||
|
|
||||||
|
def test_nan():
|
||||||
|
# usually NaN != NaN, but this would break exif self-equality
|
||||||
|
|
||||||
|
assert IFDRational(123, 0) == IFDRational(123, 0)
|
||||||
|
|
||||||
|
|
||||||
def test_ifd_rational_save(tmp_path):
|
def test_ifd_rational_save(tmp_path):
|
||||||
methods = (True, False)
|
methods = (True, False)
|
||||||
if not features.check("libtiff"):
|
if not features.check("libtiff"):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user