diff --git a/tests/conftest.py b/tests/conftest.py index 6e992cdd04092d04ff40a0efdb6293c8cff7dd7c..82eef6449eb26e93be4ff39b57b420d86cd8a68c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -162,10 +162,14 @@ class DatabaseCheckers: assert len(split[k]) == lengths[k] for s in split[k]: - assert any( - [s[0].startswith(k) for k in prefixes] - ), f"Sample with name {s[0]} does not start with any of the prefixes in {prefixes}" - assert s[1] in possible_labels + assert any([s[0].startswith(k) for k in prefixes]), ( + f"Sample with name {s[0]} does not start with any of the " + f"prefixes in {prefixes}" + ) + if isinstance(s[1], list): + assert all([k in possible_labels for k in s[1]]) + else: + assert s[1] in possible_labels @staticmethod def check_loaded_batch(