PYTHONPATH for unittest_discovery.py #20901
Unanswered
benbuckman
asked this question in
Q&A
Replies: 1 comment
-
|
Until we improve our |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using:
Our application requires multiple paths set in
PYTHONPATHto appease the assumptions of various frameworks.I'm having trouble getting this to work with the Tests panel and its
unittest_discovery.pyscript.I've tried setting
PYTHONPATHwith an.envfile and withterminal.integrated.env.osx.PYTHONPATHinsettings.json.If I hack
sys.stderr.write(f"{__file__} PYTHONPATH is: {os.environ.get('PYTHONPATH')}\n")intounittest_discovery.py, it prints outPYTHONPATH is: None.Consequently, it's not finding all my tests, and it's showing
ModuleNotFounderrors.I see that a similar issue was raised in #17179 and concluded as not having sufficient backing. Is that the end of it?
I also see an earlier #17363 where it seems like a similar issue was fixed. So that's confusing.
What is the correct way to set
PYTHONPATHfor test discovery in the Testing panel? Or is there no way currently?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions