Commit 629dd350 authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! client: Remove support for interoperability with ZEO4 server

Fix added test, which verifies that connection to ZEO4 server is rejected, to also pass on py3.
parent ee4d7bc7
...@@ -30,6 +30,6 @@ A current client should not be able to connect to an old server: ...@@ -30,6 +30,6 @@ A current client should not be able to connect to an old server:
>>> print(hlog) >>> print(hlog)
ZEO.asyncio.client ERROR ZEO.asyncio.client ERROR
Registration or cache validation failed, Z4 Registration or cache validation failed, b'Z4'
>>> hlog.uninstall() >>> hlog.uninstall()
...@@ -1827,6 +1827,8 @@ def test_suite(): ...@@ -1827,6 +1827,8 @@ def test_suite():
(re.compile("ZODB.POSException.POSKeyError"), "POSKeyError"), (re.compile("ZODB.POSException.POSKeyError"), "POSKeyError"),
(re.compile("ZEO.Exceptions.ClientStorageError"), (re.compile("ZEO.Exceptions.ClientStorageError"),
"ClientStorageError"), "ClientStorageError"),
(re.compile("ZEO.Exceptions.ClientDisconnected"),
"ClientDisconnected"),
(re.compile(r"\[Errno \d+\]"), '[Errno N]'), (re.compile(r"\[Errno \d+\]"), '[Errno N]'),
(re.compile(r"loads=\d+\.\d+"), 'loads=42.42'), (re.compile(r"loads=\d+\.\d+"), 'loads=42.42'),
# Python 3 drops the u prefix # Python 3 drops the u prefix
...@@ -1836,6 +1838,7 @@ def test_suite(): ...@@ -1836,6 +1838,7 @@ def test_suite():
if not PY3: if not PY3:
patterns.append((re.compile("^'(blob[^']*)'"), r"b'\1'")) patterns.append((re.compile("^'(blob[^']*)'"), r"b'\1'"))
patterns.append((re.compile("^'Z308'"), "b'Z308'")) patterns.append((re.compile("^'Z308'"), "b'Z308'"))
patterns.append((re.compile(r" Z4$"), " b'Z4'"))
zeo.addTest(doctest.DocTestSuite( zeo.addTest(doctest.DocTestSuite(
setUp=forker.setUp, tearDown=zope.testing.setupstack.tearDown, setUp=forker.setUp, tearDown=zope.testing.setupstack.tearDown,
checker=renormalizing.RENormalizing(patterns), checker=renormalizing.RENormalizing(patterns),
......
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