Skip to content

Commit 5dd1652

Browse files
committed
use filename instead of f
1 parent f044d53 commit 5dd1652

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

Tests/test_file_ppm.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,42 +89,42 @@ def test_16bit_pgm():
8989

9090
def test_16bit_pgm_write(tmp_path):
9191
with Image.open("Tests/images/16_bit_binary.pgm") as im:
92-
f = str(tmp_path / "temp.pgm")
93-
im.save(f, "PPM")
92+
filename = str(tmp_path / "temp.pgm")
93+
im.save(filename, "PPM")
9494

95-
assert_image_equal_tofile(im, f)
95+
assert_image_equal_tofile(im, filename)
9696

9797

9898
def test_pnm(tmp_path):
9999
with Image.open("Tests/images/hopper.pnm") as im:
100100
assert_image_similar(im, hopper(), 0.0001)
101101

102-
f = str(tmp_path / "temp.pnm")
103-
im.save(f)
102+
filename = str(tmp_path / "temp.pnm")
103+
im.save(filename)
104104

105-
assert_image_equal_tofile(im, f)
105+
assert_image_equal_tofile(im, filename)
106106

107107

108108
def test_pfm(tmp_path):
109109
with Image.open("Tests/images/hopper.pfm") as im:
110110
assert im.info["scale"] == 1.0
111111
assert_image_equal(im, hopper("F"))
112112

113-
f = str(tmp_path / "tmp.pfm")
114-
im.save(f)
113+
filename = str(tmp_path / "tmp.pfm")
114+
im.save(filename)
115115

116-
assert_image_equal_tofile(im, f)
116+
assert_image_equal_tofile(im, filename)
117117

118118

119119
def test_pfm_big_endian(tmp_path):
120120
with Image.open("Tests/images/hopper_be.pfm") as im:
121121
assert im.info["scale"] == 2.5
122122
assert_image_equal(im, hopper("F"))
123123

124-
f = str(tmp_path / "tmp.pfm")
125-
im.save(f)
124+
filename = str(tmp_path / "tmp.pfm")
125+
im.save(filename)
126126

127-
assert_image_equal_tofile(im, f)
127+
assert_image_equal_tofile(im, filename)
128128

129129

130130
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)