mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-21 04:34:47 +03:00
Add test for CommandViewer
This commit is contained in:
parent
3500c00de2
commit
ef6904ccd7
|
@ -67,6 +67,18 @@ def test_viewers():
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def test_commandviewer():
|
||||||
|
if is_win32():
|
||||||
|
basecmd =
|
||||||
|
'start "Pillow" /WAIT "{file}" '
|
||||||
|
"&& ping -n 2 127.0.0.1 >NUL "
|
||||||
|
'&& del /f "{file}"'
|
||||||
|
else:
|
||||||
|
# Not guessing command, just deleting
|
||||||
|
basecmd = "rm -f {file}"
|
||||||
|
viewer = ImageShow.CommandViewer()
|
||||||
|
im = hopper()
|
||||||
|
assert viewer.show(im, command=basecmd) == 1
|
||||||
|
|
||||||
def test_ipythonviewer():
|
def test_ipythonviewer():
|
||||||
pytest.importorskip("IPython", reason="IPython not installed")
|
pytest.importorskip("IPython", reason="IPython not installed")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user