You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note
The new --import-mode=importlib (see Import modes) doesn’t have any of the drawbacks above because sys.path and sys.modules are not changed when importing test modules, so users that run into this issue are strongly encouraged to try it and report if the new option works well for them.
The src directory layout is still strongly recommended however.
So, I think instead of moving pytket/tests in order to achieve what I wanted, we could just make the tests directory into a package and use --import-mode=importlib to avoid the problems I was seeing. According to https://docs.pytest.org/en/6.2.x/pythonpath.html#import-modes, pytest intends to make --import-mode=importlib the default at some point.
See this comment.
The text was updated successfully, but these errors were encountered: