mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-09 22:02:27 +03:00
Use monkeypatch (#9192)
This commit is contained in:
commit
eef4848a0a
|
@ -59,15 +59,12 @@ def test_show(mode: str) -> None:
|
|||
assert ImageShow.show(im)
|
||||
|
||||
|
||||
def test_show_without_viewers() -> None:
|
||||
viewers = ImageShow._viewers
|
||||
ImageShow._viewers = []
|
||||
def test_show_without_viewers(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(ImageShow, "_viewers", [])
|
||||
|
||||
with hopper() as im:
|
||||
assert not ImageShow.show(im)
|
||||
|
||||
ImageShow._viewers = viewers
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"viewer",
|
||||
|
|
Loading…
Reference in New Issue
Block a user