-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
84 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
findlibs_dependencies = ["modBlibs"] |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
from findlibs import DYLIB_PATH, find | ||
|
||
|
||
def test_transitive() -> None: | ||
"""There is a module modAlibs in this directory that mocks expected bin wheel contract: | ||
- modulename ends with 'libs' | ||
- contains libmodA.so | ||
- inside __init__ there is the findlibs_dependencies, containing modBlibs | ||
This test checks that when such module is findlibs-found, it extend the platform's dylib | ||
env var with the full path to the modBlibs module | ||
""" | ||
|
||
sys.path.append(str(Path(__file__).parent)) | ||
|
||
found = find("modA") | ||
expected_found = str(Path(__file__).parent / "modAlibs" / "libmodA.so") | ||
assert found == expected_found | ||
|
||
expected_dylib = str(Path(__file__).parent / "modBlibs") | ||
assert expected_dylib in os.environ[DYLIB_PATH[sys.platform]] |