-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Find rye pythons with and without install directory (#25)
Starting with rye 0.31 (released today), it by default installs python toolchains without the intermediate install directory (but both options continue to exist). As a side effect, this also picks up some other rye toolchains that were already installed without the intermediate install - for example pypy toolchains installed with rye.
- Loading branch information
Showing
2 changed files
with
16 additions
and
8 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 |
---|---|---|
|
@@ -82,8 +82,14 @@ def test_find_python_from_rye_provider(mocked_python, tmp_path, monkeypatch): | |
python310 = mocked_python.add_python( | ||
tmp_path / ".rye/py/[email protected]/install/bin/python3", "3.10.9" | ||
) | ||
python311 = mocked_python.add_python( | ||
tmp_path / ".rye/py/[email protected]/bin/python3", "3.11.8" | ||
) | ||
monkeypatch.setenv("HOME", str(tmp_path)) | ||
|
||
register_provider(RyeProvider) | ||
pythons = Finder(selected_providers=["rye"]).find_all(3, 10) | ||
assert python310 in pythons | ||
find_310 = Finder(selected_providers=["rye"]).find_all(3, 10) | ||
assert python310 in find_310 | ||
|
||
find_311 = Finder(selected_providers=["rye"]).find_all(3, 11) | ||
assert python311 in find_311 |