Skip to content

Commit

Permalink
reorder, comment test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Aug 8, 2024
1 parent 44402c6 commit ba1f133
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions apis/python/tests/test_registration_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,25 @@ def soma_larger(anndata_larger):
[ "index_col_and_name" , "default_index_name" , "signature_col_names" ],
[ # | Set this | If present, | signatures.py | Expected: |
# | col as idx | rename index | `default_index_name` | signature col names |
# `default_index_name` matches column that was made index ⇒ both columns present in signature
[ ( "obs_id" , ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( "obs_id" , "index" ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( "obs_id" , None ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( "alt_id" , ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( "alt_id" , "index" ), "obs_id" , ( "obs_id" , ) ],
[ ( "alt_id" , None ), "obs_id" , ( "obs_id" , ) ],
[ ( None , ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( "alt_id" , ), "alt_id" , ( "alt_id" , "obs_id" ) ],
[ ( "alt_id" , "index" ), "alt_id" , ( "alt_id" , "obs_id" ) ],
[ ( "alt_id" , None ), "alt_id" , ( "alt_id" , "obs_id" ) ],
# `default_index_name` is the column that was not made index ⇒ index dropped when named "index" or None
[ ( "alt_id" , ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( "alt_id" , "index" ), "obs_id" , ( "obs_id" , ) ],
[ ( "alt_id" , None ), "obs_id" , ( "obs_id" , ) ],
[ ( "obs_id" , ), "alt_id" , ( "alt_id" , "obs_id" ) ],
[ ( "obs_id" , "index" ), "alt_id" , ( "alt_id" , ) ],
[ ( "obs_id" , None ), "alt_id" , ( "alt_id" , ) ],
# default RangeIndex ⇒ columns are preserved
[ ( None , ), "obs_id" , ( "obs_id" , "alt_id" ) ],
[ ( None , ), "alt_id" , ( "alt_id" , "obs_id" ) ],
]
)
Expand Down

0 comments on commit ba1f133

Please sign in to comment.