-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
test_pdb fails: Unexpected sys.path[0] behavior with PYTHONSAFEPATH set #123121
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
Comments
How did you run @unittest.skipIf(sys.flags.safe_path,
'PYTHONSAFEPATH changes default sys.path')
def _run_pdb(self, pdb_args, commands,
expected_returncode=0,
extra_env=None): |
The above command fails when executed after the build. No other preliminary work is needed. |
Are you able to repro this with
Can you copy/paste the full output? Is it because of mac that the test actually ran? |
Closing as |
Bug report
Bug description:
Issue:
The test_safe_path function in test_pdb.py is failing. When PYTHONSAFEPATH is set to '1', sys.path[0] still includes the current working directory, which is unexpected.
Steps to Reproduce:
Expected Behavior:
When PYTHONSAFEPATH is set to '1', sys.path[0] should not include the current working directory.
Actual Behavior:
sys.path[0] includes the current working directory, and there's an unexpected $PYTHONPATH appended to the path.
Environment:
#121724
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
The text was updated successfully, but these errors were encountered: