Commit 5cb11e9e authored by Jérome Perrin's avatar Jérome Perrin

component/ZODB: keep running the test on python3

after slapos commit cc7f36a0 (component/defaults: use python3 by
default, 2022-08-27) this test accidentally switched to using python3.

using python3 showed an incompatibility:

   File ".nxdtest", line 23, in <module>
     TestCase('transaction',['python', '-m', 'unittest', 'discover', '-s', P(transaction)])
   File ".nxdtest", line 22, in P
     def P(path): return os.path.join(path, '..')
   File "lib/python3.8/posixpath.py", line 90, in join
     genericpath._check_arg_types('join', a, *p)
   File "lib/python3.8/genericpath.py", line 155, in _check_arg_types
     raise TypeError("Can't mix strings and bytes in path components") from None
 TypeError: Can't mix strings and bytes in path components

that we also address here by using universal_newlines to the subprocess
parent b6ff149e
......@@ -23,6 +23,8 @@ parts =
major = 4-wc2
[ZODB4-wc2-repository]
revision =
[python]
part = python2.7
# we need persistent to be a git checkout because persistent tests want to
# discover in-tree files that are not present in persistent egg when it is
......@@ -76,7 +78,9 @@ inline =
from os.path import dirname
for m in "ZODB", "persistent", "BTrees", "transaction", "ZEO":
print(dirname(__import__(m).__file__))
"""])
"""],
universal_newlines=True,
)
ZODB, persistent, BTrees, transaction, ZEO = where.split()
# run tests for whole ZODB stack
......
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