mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-13 17:25:49 +03:00
Use pytest.raises match argument
This commit is contained in:
parent
2ecf88eaa6
commit
73a2c3049f
|
@ -65,12 +65,12 @@ $bmp = New-Object Drawing.Bitmap 200, 200
|
|||
p.communicate()
|
||||
else:
|
||||
if not shutil.which("wl-paste"):
|
||||
with pytest.raises(NotImplementedError) as e:
|
||||
with pytest.raises(
|
||||
NotImplementedError,
|
||||
match="wl-paste or xclip is required for"
|
||||
r" ImageGrab.grabclipboard\(\) on Linux",
|
||||
):
|
||||
ImageGrab.grabclipboard()
|
||||
assert (
|
||||
str(e.value) == "wl-paste or xclip is required"
|
||||
" for ImageGrab.grabclipboard() on Linux"
|
||||
)
|
||||
return
|
||||
|
||||
ImageGrab.grabclipboard()
|
||||
|
|
Loading…
Reference in New Issue
Block a user