Commit 30f0ccf
committed
gh-151089: Fix mocking in test_ctypes/test_find.py:test_find_library_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.1 parent 11c93d6 commit 30f0ccf
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
0 commit comments