tests: fix a pytest deprecation warning

https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec
This commit is contained in:
Christoph Reiter 2019-02-13 17:02:09 +01:00
parent 56a7bd5b61
commit a54e7dbcd4
1 changed files with 2 additions and 1 deletions

View File

@ -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)