summaryrefslogtreecommitdiff
path: root/cherrypy
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2019-07-03 11:59:52 +0200
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2019-07-06 17:05:55 +0200
commit9edca3d4e120cfb160529df53c7f15faf1744257 (patch)
treeb5edb8f5be86cfe6248d991f9e8eb5cd13347ed3 /cherrypy
parentc3c2cec9a74f2c9fe71849c9aff5ab0e7f5743ec (diff)
downloadcherrypy-git-9edca3d4e120cfb160529df53c7f15faf1744257.tar.gz
Fix test_invalid_status to work with pytest 5
Ref: https://github.com/cherrypy/cherrypy/pull/1791#issuecomment-508026879
Diffstat (limited to 'cherrypy')
-rw-r--r--cherrypy/test/test_httputil.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cherrypy/test/test_httputil.py b/cherrypy/test/test_httputil.py
index 656b8a3d..c5ec3511 100644
--- a/cherrypy/test/test_httputil.py
+++ b/cherrypy/test/test_httputil.py
@@ -74,7 +74,5 @@ def test_valid_status(status, expected_status):
)
def test_invalid_status(status_code, error_msg):
"""Check that invalid status cause certain errors."""
- with pytest.raises(ValueError) as excinfo:
+ with pytest.raises(ValueError, match=error_msg):
httputil.valid_status(status_code)
-
- assert error_msg in str(excinfo)