pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/pull/151231

db.css" /> gh-151089: Improve mocking and skipping in test_ctypes/test_find.py by rossburton · Pull Request #151231 · python/cpython · GitHub
Skip to content

gh-151089: Improve mocking and skipping in test_ctypes/test_find.py#151231

Open
rossburton wants to merge 2 commits into
python:mainfrom
rossburton:ctypes
Open

gh-151089: Improve mocking and skipping in test_ctypes/test_find.py#151231
rossburton wants to merge 2 commits into
python:mainfrom
rossburton:ctypes

Conversation

@rossburton

@rossburton rossburton commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

test_find_library_with_gcc will pass if gcc isn't present as the mocking isn't complete, and when that is fixed the skipping isn't complete.

…brary_with_gcc()

ctypes.util.find_library() on POSIX will try ldconfig then gcc then ld.

test_find_library_with_gcc() mocks away just the use of ldconfig, so if
gcc isn't actually present on the machine (because the tests are being
ran on an installed system, for example) then it will happily fall back
to using ld, which makes a mockery (pun unintended) of the test case
name.

Also mock _findLib_ld to return None, so the test either uses gcc or
fails if it isn't present.
@bedevere-app bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Jun 10, 2026
@rossburton rossburton changed the title gn-151089: Improve mocking and skipping in test_ctypes/test_find.py gh-151089: Improve mocking and skipping in test_ctypes/test_find.py Jun 10, 2026
…test_find.py

In FindLibraryLinux, check for gcc and ld in setUpClass and then skip
the tests that need those commands to be present.
@rossburton

Copy link
Copy Markdown
Contributor Author

The test failure appears to be entirely unrelated to my change.

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

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy