tests: fix a pytest deprecation warning
https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec
This commit is contained in:
parent
56a7bd5b61
commit
a54e7dbcd4
|
@ -87,7 +87,8 @@ def test_context():
|
|||
|
||||
def test_surface():
|
||||
# TypeError: The Surface type cannot be instantiated
|
||||
pytest.raises(TypeError, "s = cairo.Surface()")
|
||||
with pytest.raises(TypeError):
|
||||
cairo.Surface()
|
||||
|
||||
f, w, h = cairo.FORMAT_ARGB32, 100, 100
|
||||
s = cairo.ImageSurface(f, w, h)
|
||||
|
|
Loading…
Reference in New Issue