diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-02-06 07:50:15 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-02-06 07:50:15 -0500 |
commit | 804d1f0cc8d9e3276674cf3169fbd4852aaba39a (patch) | |
tree | d44e0d352479dd60527903fabaa5e50a9d1b8745 | |
parent | 798373e3983e903fc6cd40799891c5bb2af0e632 (diff) | |
download | cherrypy-804d1f0cc8d9e3276674cf3169fbd4852aaba39a.tar.gz |
Extract template as a variable and use new style string formatting.
-rw-r--r-- | cherrypy/test/test_conn.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cherrypy/test/test_conn.py b/cherrypy/test/test_conn.py index 57aabb8a..3dc5fed8 100644 --- a/cherrypy/test/test_conn.py +++ b/cherrypy/test/test_conn.py @@ -799,8 +799,11 @@ class LimitedRequestQueueTests(helper.CPWebCase): if exc.args[0] in socket_reset_errors: pass # Expected. else: - raise AssertionError("Overflow conn did not get RST. " - "Got %s instead" % repr(exc.args)) + tmpl = ( + "Overflow conn did not get RST. " + "Got {exc.args!r} instead" + ) + raise AssertionError(tmpl.format(**locals())) except BadStatusLine: # This is a special case in OS X. Linux and Windows will # RST correctly. |