Skip to content

Commit

Permalink
Python3.2 raises a different error message. Fixes checkExceptionLogsA…
Browse files Browse the repository at this point in the history
…tError
  • Loading branch information
jamadden committed May 22, 2015
1 parent 3d31c7a commit 25f0ea2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ZEO/tests/testZEO.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,17 +556,23 @@ def checkExceptionLogsAtError(self):
'history() raised exception: history() takes at most '
'3 arguments (5 given)'
)
py32_msg = (
'history() raised exception: history() takes at most '
'3 positional 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:
if message.endswith(py2_msg) or message.endswith(py3_msg):
if (message.endswith(py2_msg) or
message.endswith(py32_msg) or
message.endswith(py3_msg)):
self.assertEqual(level,logging.ERROR)
self.assertEqual(kw,{'exc_info':True})
break
else:
self.fail("error not in log")
self.fail("error not in log %s" % log)

# cleanup
del conn.logger.log
Expand Down

0 comments on commit 25f0ea2

Please sign in to comment.