mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Removed "del im"
This commit is contained in:
parent
1263018d2a
commit
9ed8ca1494
|
@ -24,10 +24,12 @@ def test_sanity():
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(TEST_FILE)
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -32,10 +32,12 @@ def test_sanity():
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(static_test_file)
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -32,10 +32,12 @@ def test_sanity():
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(TEST_GIF)
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -28,10 +28,12 @@ def test_name_limit(tmp_path):
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(TEST_IM)
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -38,10 +38,12 @@ def test_sanity(test_file):
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(test_files[0])
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -23,10 +23,12 @@ def test_sanity():
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(test_file)
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -21,10 +21,12 @@ def test_sanity():
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file():
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open(TEST_FILE)
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
|
||||
def test_closed_file():
|
||||
|
|
|
@ -57,10 +57,12 @@ class TestFileTiff:
|
|||
|
||||
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
|
||||
def test_unclosed_file(self):
|
||||
with pytest.warns(ResourceWarning):
|
||||
def open():
|
||||
im = Image.open("Tests/images/multipage.tiff")
|
||||
im.load()
|
||||
del im
|
||||
|
||||
with pytest.warns(ResourceWarning):
|
||||
open()
|
||||
|
||||
def test_closed_file(self):
|
||||
with warnings.catch_warnings():
|
||||
|
|
Loading…
Reference in New Issue
Block a user