Commit 84b3cab2 authored by Tres Seaver's avatar Tres Seaver

Moar Py3k doctest normalization.

parent 3539498f
...@@ -722,8 +722,18 @@ def storage_reusable_suite(prefix, factory, ...@@ -722,8 +722,18 @@ def storage_reusable_suite(prefix, factory,
"blob_transaction.txt", "blob_transaction.txt",
setUp=setup, tearDown=zope.testing.setupstack.tearDown, setUp=setup, tearDown=zope.testing.setupstack.tearDown,
checker=zope.testing.renormalizing.RENormalizing([ checker=zope.testing.renormalizing.RENormalizing([
(re.compile("POSKeyError: u'No blob file"), # Py3k renders bytes where Python2 used native strings...
(re.compile(r"^b'"), "'"),
(re.compile(r'^b"'), '"'),
# ...and native strings where Python2 used unicode.
(re.compile("^POSKeyError: u'No blob file"),
"POSKeyError: 'No blob file"), "POSKeyError: 'No blob file"),
# Py3k repr's exceptions with dotted names
(re.compile("^ZODB.interfaces.BlobError:"), "BlobError:"),
(re.compile("^ZODB.POSException.ConflictError:"), "ConflictError:"),
(re.compile("^ZODB.POSException.POSKeyError:"), "POSKeyError:"),
(re.compile("^ZODB.POSException.Unsupported:"), "Unsupported:"),
# Normalize out blobfile paths for sake of Windows
(re.compile( (re.compile(
r'([a-zA-Z]:)?\%(sep)s.*\%(sep)sblobs\%(sep)s.*\.blob' r'([a-zA-Z]:)?\%(sep)s.*\%(sep)sblobs\%(sep)s.*\.blob'
% dict(sep=os.path.sep)), '<BLOB STORAGE PATH>') % dict(sep=os.path.sep)), '<BLOB STORAGE PATH>')
......
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