From 9689d6c7353bdecda670759b14b1fd0e97930cb8 Mon Sep 17 00:00:00 2001 From: Mihail Shinder Date: Sat, 20 Nov 2021 14:33:49 +0200 Subject: [PATCH] Add wrong command handling tests --- Tests/test_imageshow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tests/test_imageshow.py b/Tests/test_imageshow.py index 832546be5..22658780e 100644 --- a/Tests/test_imageshow.py +++ b/Tests/test_imageshow.py @@ -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)