Add wrong command handling tests

This commit is contained in:
Mihail Shinder 2021-11-20 14:33:49 +02:00
parent 438dc4504b
commit 9689d6c735
No known key found for this signature in database
GPG Key ID: C89443B0B525978E

View File

@ -78,6 +78,10 @@ def test_commandviewer():
basecmd = "rm -f {file}"
viewer = ImageShow.CommandViewer()
im = hopper()
with pytest.raises(TypeError):
viewer.get_command(viewer.save_image(im))
with pytest.raises(TypeError):
viewer.get_command(viewer.save_image(im), command=5)
viewer.get_command(viewer.save_image(im), command=basecmd)