Commit e868655c authored by Kirill Smelkov's avatar Kirill Smelkov

lib/zodb: tests: Mark test_zstor_2zurl as xfailing on py3

Because it uses NEO/py which is not yet ported to py3 and fails even
with today's NEO/py master (v1.12-148-g1020ac40) with:

    =================================== FAILURES ===================================
    _______________________________ test_zstor_2zurl _______________________________

    ...

    >       _(neo("test",  "127.0.0.1:1234"),         "neo://test@127.0.0.1:1234")            # NEO/ip4

    lib/tests/test_zodb.py:526:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    lib/tests/test_zodb.py:497: in neo
        from neo.client.Storage import Storage as NEOStorage
    ../../neo/src/lab.nexedi.com/kirr/neo/neo/client/__init__.py:52: in <module>
        from . import app # set up signal handlers early enough to do it in the main thread
    ../../neo/src/lab.nexedi.com/kirr/neo/neo/client/app.py:31: in <module>
        from neo.lib import logging
    ../../neo/src/lab.nexedi.com/kirr/neo/neo/lib/__init__.py:17: in <module>
        from .logger import logging
    ../../neo/src/lab.nexedi.com/kirr/neo/neo/lib/logger.py:25: in <module>
        from .util import nextafter
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

        from __future__ import division
        import os, socket
        from binascii import a2b_hex, b2a_hex
        from datetime import timedelta, datetime
        from hashlib import sha1
    >   from Queue import deque
    E   ModuleNotFoundError: No module named 'Queue'

    ../../neo/src/lab.nexedi.com/kirr/neo/neo/lib/util.py:22: ModuleNotFoundError

After this patch running wendelin.core test on py3 locally passes fully with
FileStorage, and fully with ZEO if https://github.com/Pylons/zodburi/pull/35
fix is applied to zodburi.

/cc @vnmabus
/reviewed-by @levin.zimmermann, @jerome
/reviewed-on nexedi/wendelin.core!35
parent e7d161d1
......@@ -35,6 +35,7 @@ import pytest; xfail = pytest.mark.xfail
from ZEO.ClientStorage import ClientStorage as ZEOStorage
import os
from six.moves.urllib.parse import quote_plus
from six import PY3
from wendelin.lib.tests.testprog import zopenrace, zloadrace
......@@ -493,6 +494,8 @@ def test_zstor_2zurl(tmpdir, neo_ssl_dict):
# neo returns new NEO client for specified cluster name and master address.
# NOTE, similarly to ZEO, the client is returned without waiting until server nodes are connected.
def neo(cluster_name, master_addr, ssl=0):
if PY3:
pytest.xfail(reason="NEO/py is not yet ported to py3")
# TODO revert to import neo globally after lab.nexedi.com/nexedi/neoppod/-/merge_requests/24 is landed
from neo.client.Storage import Storage as NEOStorage
kwargs = dict(master_nodes=master_addr, name=cluster_name)
......
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