Skip to content

[3.8] bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)#19090

Merged
vstinner merged 2 commits into
python:3.8from
vstinner:test_site_pth38
Mar 20, 2020
Merged

[3.8] bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)#19090
vstinner merged 2 commits into
python:3.8from
vstinner:test_site_pth38

Conversation

@vstinner

@vstinner vstinner commented Mar 20, 2020

Copy link
Copy Markdown
Member

test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.

https://bugs.python.org/issue27807

test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.
@stratakis

Copy link
Copy Markdown
Contributor

Tested it downstream by adding a .pth file in site-packages and running the test. It gets skipped properly now with

test_startup_imports (test.test_site.StartupImportTests) ... skipped 'found 1 .pth files in: /usr/lib64/python3.8/site-packages'

@vstinner

Copy link
Copy Markdown
Member Author

@stratakis: Thanks for the test!

@vstinner
vstinner merged commit ba26bf3 into python:3.8 Mar 20, 2020
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@vstinner
vstinner deleted the test_site_pth38 branch March 20, 2020 14:10
@bedevere-bot

Copy link
Copy Markdown

GH-19093 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 20, 2020
…ythonGH-19060) (pythonGH-19090)

test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.
(cherry picked from commit ba26bf3)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington added a commit that referenced this pull request Mar 20, 2020
…H-19060) (GH-19090)

test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.
(cherry picked from commit ba26bf3)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants