Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-128779: add test for venv --system-site-packages#129462

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
FFY00 wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromFFY00:gh-128779-test

Conversation

@FFY00
Copy link
Member

@FFY00FFY00 commentedJan 30, 2025
edited by bedevere-appbot
Loading

Signed-off-by: Filipe Laíns <lains@riseup.net>
vstinner
vstinner previously approved these changesJan 30, 2025
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@vstinner
Copy link
Member

Oh, the test fails on macOS:

FAIL: test_system_site_packages (test.test_site.ImportSideEffectTests.test_system_site_packages)----------------------------------------------------------------------Traceback (most recent call last):  File "/Users/runner/work/cpython/cpython/Lib/test/test_site.py", line 604, in test_system_site_packages    assert system_paths['purelib'] in sys_path, sys_path           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: ['', '/opt/python-dev/lib/python314.zip', '/Users/runner/work/cpython/cpython/Lib', '/Users/runner/work/cpython/cpython/build/lib.macosx-10.15-x86_64-3.14', '/var/folders/db/x5_t5x655c9_rftmy0wp2t2w0000gn/T/test_python_gtmi9q2i/test.test_site.ImportSideEffectTests.test_system_site_packages-venv-e7dft2vv/lib/python3.14/site-packages', '/Users/runner/.local/lib/python3.14/site-packages']

And Ubuntu (ARM):

FAIL: test_system_site_packages (test.test_site.ImportSideEffectTests.test_system_site_packages)----------------------------------------------------------------------Traceback (most recent call last):  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_site.py", line 604, in test_system_site_packages    assert system_paths['purelib'] in sys_path, sys_path           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: ['', '/usr/local/lib/python314.zip', '/home/runner/work/cpython/cpython-ro-srcdir/Lib', '/home/runner/work/cpython/cpython-builddir/build/lib.linux-aarch64-3.14', '/tmp/test_python_i18th5xw/test.test_site.ImportSideEffectTests.test_system_site_packages-venv-gxaqwl9t/lib/python3.14/site-packages', '/home/runner/.local/lib/python3.14/site-packages']

I applied my suggestion to debug this issue.

@vstinner
Copy link
Member

Error using assertIn() and assertNotIn().

macOS (I reformatted the error to make it more readable):

FAIL: test_system_site_packages (test.test_site.ImportSideEffectTests.test_system_site_packages)----------------------------------------------------------------------Traceback (most recent call last):  File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/test_site.py", line 604, in test_system_site_packages    self.assertIn(system_paths['purelib'], sys_path)    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: '/opt/python-dev/lib/python3.14/site-packages' not found in['', '/opt/python-dev/lib/python314.zip', '/Users/admin/actions-runner/_work/cpython/cpython/Lib', '/Users/admin/actions-runner/_work/cpython/cpython/build/lib.macosx-10.15-arm64-3.14', '/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/test_python_txbd6rj8/test.test_site.ImportSideEffectTests.test_system_site_packages-venv-0o61kyua/lib/python3.14/site-packages', '/Users/admin/.local/lib/python3.14/site-packages']

Ubuntu (ARM, output also reformatted):

FAIL: test_system_site_packages (test.test_site.ImportSideEffectTests.test_system_site_packages)----------------------------------------------------------------------Traceback (most recent call last):  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_site.py", line 604, in test_system_site_packages    self.assertIn(system_paths['purelib'], sys_path)    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: '/usr/local/lib/python3.14/site-packages' not found in['', '/usr/local/lib/python314.zip', '/home/runner/work/cpython/cpython-ro-srcdir/Lib', '/home/runner/work/cpython/cpython-builddir/build/lib.linux-aarch64-3.14', '/tmp/test_python_9rfle_5u/test.test_site.ImportSideEffectTests.test_system_site_packages-venv-cpa6g3tp/lib/python3.14/site-packages', '/home/runner/.local/lib/python3.14/site-packages']

@vstinnervstinner dismissed theirstale reviewJanuary 30, 2025 10:17

I remove my approval since tests fail.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner left review comments

Assignees

No one assigned

Labels

awaiting reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@FFY00@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp