Skip to content

Add test coverage for edge cases in neuron selection (neuron_ids / indexes) #146

@AbirajKangotra

Description

@AbirajKangotra

Problem

Hi! I was going through the recent changes around neuron selection (neuron_ids and indexes) and had a quick question regarding test coverage.

From what I saw, the feature introduces some non-trivial logic (like mutual exclusivity and different selection paths), but I wasn’t sure if edge cases are currently covered by tests.

For example, in the selection logic there is handling like:

if neuron_ids is not None and indexes is not None:
raise ValueError("Only one of neuron_ids or indexes can be provided")

and selection based on inputs:

if neuron_ids is not None:
# select based on neuron_ids
elif indexes is not None:
# select based on indexes

But I couldn’t find clear tests covering cases like:

  • Passing both neuron_ids and indexes
  • Invalid or non-existent neuron_ids
  • Out-of-range indexes
  • Empty or duplicate inputs

Why I’m bringing this up

These cases might lead to unexpected behavior if not explicitly tested, especially as the feature evolves.


Question

Does it make sense to add tests for these edge cases?
If yes, I’d be happy to work on this and open a PR.


Let me know if this aligns with the current direction — just wanted to confirm before starting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions