Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tests/test_file_dcx.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ def test_sanity() -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file() -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open(TEST_FILE)
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()


def test_closed_file() -> None:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_file_fli.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ def test_prefix_chunk(monkeypatch: pytest.MonkeyPatch) -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file() -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open(static_test_file)
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()


def test_closed_file() -> None:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_file_im.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def test_name_limit(tmp_path: Path) -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file() -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open(TEST_IM)
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()


def test_closed_file() -> None:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_file_mpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def test_sanity(test_file: str) -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file() -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open(test_files[0])
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()


def test_closed_file() -> None:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_file_psd.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ def test_sanity() -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file() -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open(test_file)
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()


def test_closed_file() -> None:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_file_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ def test_sanity() -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file() -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open(TEST_FILE)
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()


def test_closed_file() -> None:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_file_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ def test_sanity(self, tmp_path: Path) -> None:

@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
def test_unclosed_file(self) -> None:
def open() -> None:
def open_test_image() -> None:
im = Image.open("Tests/images/multipage.tiff")
im.load()

with pytest.warns(ResourceWarning):
open()
open_test_image()

def test_closed_file(self) -> None:
with warnings.catch_warnings():
Expand Down
Loading