From 7fd6a0ac1eccff5d772942b5de453309a967ca0b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 2 Sep 2025 21:27:30 +0100 Subject: Drop duplicates in generated test phenotype frames. --- tests/helpers/strategies.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/helpers/strategies.py b/tests/helpers/strategies.py index 00c4c11..416a914 100644 --- a/tests/helpers/strategies.py +++ b/tests/helpers/strategies.py @@ -80,10 +80,14 @@ phenotype_names = st.lists(tabless_printable_ascii_text @st.composite def phenotype_frames(draw): - return draw(data_frames( + phenotype = draw(data_frames( columns=([column(name="sample-id", dtype="str", elements=tabless_printable_ascii_text)] + columns(draw(phenotype_names), dtype="float64", elements=st.floats(allow_nan=False))))) + return phenotype.drop_duplicates(subset=list( + filter(is_phenotype_metadata_column, + phenotype.columns)), + ignore_index=True) -- cgit 1.4.1