Skip to content

Commit ecfae11

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7dbafbb commit ecfae11

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Tests/test_file_tiff_metadata.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,13 @@ def test_writing_other_types_to_undefined(
280280
assert isinstance(reloaded, TiffImagePlugin.TiffImageFile)
281281
assert reloaded.tag_v2[33723] == b"1"
282282

283+
283284
@pytest.mark.parametrize(
284285
"value, expected",
285286
(
286-
(IFDRational(1,0), TiffTags.RATIONAL),
287-
(IFDRational(-1,0), TiffTags.SIGNED_RATIONAL)
288-
)
287+
(IFDRational(1, 0), TiffTags.RATIONAL),
288+
(IFDRational(-1, 0), TiffTags.SIGNED_RATIONAL),
289+
),
289290
)
290291
def test_tagtype_on_zero_denominator(
291292
value: IFDRational, expected: int, tmp_path: Path
@@ -303,6 +304,7 @@ def test_tagtype_on_zero_denominator(
303304
assert isinstance(reloaded, TiffImagePlugin.TiffImageFile)
304305
assert math.isnan(reloaded.tag_v2[37380])
305306

307+
306308
def test_undefined_zero(tmp_path: Path) -> None:
307309
# Check that the tag has not been changed since this test was created
308310
tag = TiffTags.TAGS_V2[45059]

Tests/test_tiff_ifdrational.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ def test_ifd_rational_save(
7575
assert isinstance(reloaded, TiffImagePlugin.TiffImageFile)
7676
assert float(IFDRational(301, 1)) == float(reloaded.tag_v2[282])
7777

78+
7879
@pytest.mark.parametrize(
7980
"numerator, denominator, expected_result",
8081
[
8182
(1, 1, 1.0),
82-
(1, 0, float('nan')),
83-
]
83+
(1, 0, float("nan")),
84+
],
8485
)
8586
def test_float_cast(numerator, denominator, expected_result):
8687
float(IFDRational(numerator, denominator)) == expected_result

0 commit comments

Comments
 (0)