Allow an easy/compatible way to get a second fixture

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
testing

Research direction

Start with the parametrized test example in the issue and inspect how the project currently defines the array_type fixture and uses pytest parametrization. Determine the intended compatible API for supplying a second fixture, then add coverage showing that the resulting test receives both values; the issue is done when this pattern no longer requires the shown workaround.

Written by the indexing model from the issue text.

Description

parity

For def test_thing(array_type, target_array_type).

This doesn‘t look great:

@pytest.mark.array_type(skip=NON_BASIC_FLAGS)
@pytest.mark.parametrize(
    "new_array_type", [t for t in SUPPORTED_TYPES if not (t.flags & NON_BASIC_FLAGS)]
)
def test_setter_view(
    array_type: ArrayType[np.ndarray | CSMatrix | CSArray],
    new_array_type: ArrayType[np.ndarray | CSMatrix | CSArray],
) -> None:
    ...
Dominant language
Python
Stars
15
Forks
5
Avg merge
10h 33m
Merged PRs (30d)
9

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scverse/fast-array-utils

All issues in scverse/fast-array-utils

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.