-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail with a helpful message if separate cache is not supported (#186)
* Add Julia._unbox_as * Fail with a helpful message if separate cache is not supported * Emit different message when statically linked * Rename: test_utils.py -> test_find_libpython.py * Test raise_separate_cache_error
- Loading branch information
Showing
3 changed files
with
182 additions
and
28 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
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,25 @@ | ||
import platform | ||
|
||
import pytest | ||
|
||
from julia.find_libpython import finding_libpython, linked_libpython | ||
from julia.core import determine_if_statically_linked | ||
|
||
try: | ||
unicode | ||
except NameError: | ||
unicode = str # for Python 3 | ||
|
||
|
||
def test_finding_libpython_yield_type(): | ||
paths = list(finding_libpython()) | ||
assert set(map(type, paths)) <= {str, unicode} | ||
# In a statically linked Python executable, no paths may be found. So | ||
# let's just check returned type of finding_libpython. | ||
|
||
|
||
@pytest.mark.xfail(platform.system() == "Windows", | ||
reason="linked_libpython is not implemented for Windows") | ||
def test_linked_libpython(): | ||
if determine_if_statically_linked(): | ||
assert linked_libpython() is not None |
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