lib/zodb: tests: Do not import NEO globally.
NEO is still not ported to Python 3. Importing NEO globally thus makes pytest tests fail during the assert-rewritting step: ```python ../../venvs/wendelin.core/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:178: in exec_module exec(co, module.__dict__) lib/tests/test_zodb.py:36: in <module> from neo.client.Storage import Storage as NEOStorage ../neoppod/neo/client/__init__.py:52: in <module> from . import app # set up signal handlers early enough to do it in the main thread E File "/srv/slapgrid/slappart66/git/neoppod/neo/client/app.py", line 356 E except NEOStorageReadRetry, e: E ^ E SyntaxError: invalid syntax ``` A MR adding enough support to not fail at import time is proposed in neoppod!24 . However, that MR will not be reviewed until the vacation period is over. In the meantime, and as a previous step to make running NEO tests optional, the import has been moved inside the function loading NEO. Thus, only the tests that require NEO will fail. -------- kirr: Add TODO to revert to import NEO globally after lab.nexedi.com/nexedi/neoppod/-/merge_requests/24 is landed. /reviewed-by @kirr /reviewed-on !27
Showing