Commit ae9c3f45 authored by dieter's avatar dieter Committed by Kirill Smelkov

make blob test `commit_from_wrong_partition` more robust

The blob test `commit_from_wrong_partition` makes use of the logger `ZODB.blob.copied`.

In some cases, this test fails not because the ZODB did something wrong but because the logger is disabled.

At least under Python 3.6, `logging.fileConfig` (and likely all other functions configuring the logging system) disables by default all existing loggers. If logger `ZODB.blob.copied` is already created at that time (i.e. if `ZODB.blob` has been imported), it gets disabled.

The PR adds `logger.disabled = False` to the test `commit_from_wrong_partition` to let it work correctly in those situations.
parent 1226c9d3
......@@ -379,6 +379,7 @@ def commit_from_wrong_partition():
>>> logger.propagate = False
>>> logger.setLevel(logging.DEBUG)
>>> logger.addHandler(handler)
>>> logger.disabled = False
>>> blob_storage = create_storage() # noqa: F821 undefined name
>>> database = DB(blob_storage)
......
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