-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testlauncher.py overwrites sys.path #11363
Comments
This broke my test debugging this morning. The workaround fixes it. |
Thanks for identifying the fix, we can the confirm that it's bug. |
I also have this issue and the workaround did work for me as well! |
For n00bs like me working in a dev container, the default location of testlauncher.py is one of |
Hello! We have just finished our testing rewrite and are beginning the roll out to users. If you are able, it would be very helpful to know if your issue still exists on the rewrite! To try it yourself, add this setting to your users You can confirm you have the rewrite enabled by setting Let me know if the rewrite fixes your issue. Thanks! |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Environment data
Expected behaviour
sys.path is not modified
Actual behaviour
line 26: sys.path[0] = os.getcwd()
overwrites top entry in the sys.path during unit test debugging (pytest in this case). This leads to errors to find modules that were available on that path. It is not obvious why this behavior as there are no comments, but it seems the intention was to insert cwd at the top of sys.path
Steps to reproduce:
Workaround
Edit testLauncher.py and comment out the offending line or replace with sys.path.insert(0, os.getcwd())
The text was updated successfully, but these errors were encountered: