Commit 428643f5 authored by Tres Seaver's avatar Tres Seaver

Work around ZODB registering level names backwards.

Before Python 3.4, the logging module registered them in both
directions, but quit doing so in 3.4, breaking doctests which expected
to display custom level name ("BLATHER").
parent 18e7f0c4
......@@ -224,6 +224,13 @@ def some_basic_locking_tests():
>>> logging.getLogger('ZEO').addHandler(handler)
>>> logging.getLogger('ZEO').setLevel(logging.DEBUG)
Work around the fact that ZODB registers level names backwards, which
quit working in Python 3.4:
>>> import logging
>>> from ZODB.loglevels import BLATHER
>>> logging.addLevelName(BLATHER, "BLATHER")
We start a transaction and vote, this leads to getting the lock.
>>> zs1 = ZEO.tests.servertesting.client(server, '1')
......@@ -435,6 +442,13 @@ Set up server and logging:
>>> logging.getLogger('ZEO').addHandler(handler)
>>> logging.getLogger('ZEO').setLevel(logging.DEBUG)
Work around the fact that ZODB registers level names backwards, which
quit working in Python 3.4:
>>> import logging
>>> from ZODB.loglevels import BLATHER
>>> logging.addLevelName(BLATHER, "BLATHER")
Now, we'll start a transaction, get the lock and then mark the
ZEOStorage as closed and see if trying to get a lock cleans it up:
......
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