Commit a0fc52e2 authored by Jérome Perrin's avatar Jérome Perrin

test_slapgrid: support virtualenv paths

When using virtualenv, the module paths are not simple list, but
instances of importlib._bootstrap_external._NamespacePath.

According to docs [1] module's __path__ does is not a list, but an
iterator producing strings.

Cast to a list to consume these iterators.

[1]
https://docs.python.org/3/reference/import.html?highlight=__path__#path__
parent 91edab77
......@@ -69,7 +69,7 @@ from slapos.util import dumps
from slapos import __path__ as slapos_path
from zope import __path__ as zope_path
PROMISE_PATHS = sorted(set(map(os.path.dirname, slapos_path + zope_path)))
PROMISE_PATHS = sorted(set(map(os.path.dirname, list(slapos_path) + list(zope_path))))
import httmock
......
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