From dd32f049f27f4a2d98dec1fe3cdf37ee210a5d7b Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Thu, 12 Dec 2024 13:46:34 +0100 Subject: [PATCH] Add test when providing None --- tests/test_api.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 7968f975..f4e62b9f 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -66,12 +66,14 @@ def test_available_repositories(tmpdir): repositories.append(audb.Repository(repo, host, "file-system")) # Fake dataset by adding db.yaml file audeer.touch(audeer.mkdir(host, repo, f"name{n}", "1.0.0"), "db.yaml") - df = audb.available(repositories=repositories) - assert len(df) == 2 + # Look at all repositories + for repositories_argument in [None, repositories]: + df = audb.available(repositories=repositories_argument) + assert len(df) == 2 for n, repository in enumerate(repositories): # Test for string and list arguments - for repo_test in [repository, [repository]]: - df = audb.available(repositories=repo_test) + for repositories_argument in [repository, [repository]]: + df = audb.available(repositories=repositories_argument) assert len(df) == 1 assert df.host.iloc[0] == repository.host assert df.repository.iloc[0] == repository.name