-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: gateway recursive records (#930)
Fix an issue where all records where returned by the gateway even when they didnt match the root specs when using recursive mode.
- Loading branch information
1 parent
ccbfb88
commit e8cad8f
Showing
5 changed files
with
54 additions
and
13 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
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
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,13 @@ | ||
import pytest | ||
|
||
from rattler import Gateway, Channel | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_single_record_in_recursive_query(gateway: Gateway, conda_forge_channel: Channel) -> None: | ||
subdirs = await gateway.query( | ||
[conda_forge_channel], ["linux-64", "noarch"], ["python 3.10.0 h543edf9_1_cpython"], recursive=True | ||
) | ||
|
||
python_records = [record for subdir in subdirs for record in subdir if record.name == "python"] | ||
assert len(python_records) == 1 |