diff --git a/bbconf/bbconf.py b/bbconf/bbconf.py index ad011b7..c1ebed8 100644 --- a/bbconf/bbconf.py +++ b/bbconf/bbconf.py @@ -462,7 +462,7 @@ def select_unique(self, table_name: str, column: str = None) -> List[dict]: f"Incorrect table name provided {table_name}" ) - return [i for n, i in enumerate(values) if i not in values[n + 1:]] + return [i for n, i in enumerate(values) if i not in values[n + 1 :]] @property def BedfileORM(self) -> SQLModel: diff --git a/tests/test_bbconf.py b/tests/test_bbconf.py index d70ec3c..37ec928 100644 --- a/tests/test_bbconf.py +++ b/tests/test_bbconf.py @@ -121,11 +121,9 @@ def test_select(self, cfg_pth, test_data_bed, test_data_bedset): ) unique_bedfiles = bbc.select_unique(table_name="bedfile__sample") - assert unique_bedfiles[0].record_identifier == "bed1" + assert unique_bedfiles[0]["record_identifier"] == "bed1" unique_bedsets = bbc.select_unique(table_name="bedsets__sample") - assert unique_bedsets[0].record_identifier == "bedset1" - results = bbc.select_bedfiles_for_bedset() - assert results is not None + assert unique_bedsets[0]["record_identifier"] == "bedset1" def test_removal(self, cfg_pth, test_data_bed, test_data_bedset): with ContextManagerDBTesting(DB_URL): @@ -160,7 +158,6 @@ def test_select_bedfiles_from_bedset(self): # TODO: add test assert True - @pytest.mark.skipif(True, reason="not implemented") def test_get_bed_drs_metadata(self): # TODO: add test