Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix test_list_spaces_linked #2707

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2318,13 +2318,13 @@ def test_list_spaces_with_datasets(self):
assert "wikipedia" in spaces[0].datasets

def test_list_spaces_linked(self):
space_id = "open-llm-leaderboard/open_llm_leaderboard"
space_id = "stabilityai/stable-diffusion"

spaces = list(self._api.list_spaces(search=space_id))
spaces = [space for space in self._api.list_spaces(search=space_id) if space.id == space_id]
assert spaces[0].models is None
assert spaces[0].datasets is None

spaces = list(self._api.list_spaces(search=space_id, linked=True))
spaces = [space for space in self._api.list_spaces(search=space_id, linked=True) if space.id == space_id]
assert spaces[0].models is not None
assert spaces[0].datasets is not None

Expand Down
Loading