Skip to content

Can we have common test utilities when running with --import-mode=importlib? #9109

Answered by nicoddemus
pmeier asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @pmeier,

Did I do something wrong in the setup or is the documentation misleading and importing from other test utilities is not supported for --import-mode=importlib?

The latter is true, --import-mode=importlib will import your tests without modifying sys.path at all, which means tests cannot import from each other.

There's #8964 about adding some support for that, but that discussion lost steam.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pmeier
Comment options

Answer selected by pmeier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants