Commit ec9bafb3 authored by Albertas Agejevas's avatar Albertas Agejevas

Error message differs on py2 and py3.

parent 2327c877
...@@ -549,11 +549,16 @@ class ZRPCConnectionTests(ZEO.tests.ConnectionTests.CommonSetupTearDown): ...@@ -549,11 +549,16 @@ class ZRPCConnectionTests(ZEO.tests.ConnectionTests.CommonSetupTearDown):
'foo', 0, 'history', (1, 2, 3, 4)) 'foo', 0, 'history', (1, 2, 3, 4))
# test logging # test logging
py2_msg = (
'history() raised exception: history() takes at most '
'3 arguments (5 given)'
)
py3_msg = (
'history() raised exception: history() takes '
'from 2 to 3 positional arguments but 5 were given'
)
for level, message, kw in log: for level, message, kw in log:
if message.endswith( if message.endswith(py2_msg) or message.endswith(py3_msg):
') history() raised exception: history() takes at'
' most 3 arguments (5 given)'
):
self.assertEqual(level,logging.ERROR) self.assertEqual(level,logging.ERROR)
self.assertEqual(kw,{'exc_info':True}) self.assertEqual(kw,{'exc_info':True})
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment