pydata / pydata/sparse

Make the test suite more robust

Open
#163 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Python
Stars
668
Forks
141
Avg merge
2d 8h
Merged PRs (30d)
4

Description

I was thinking of moving the tests to a more robust unit test model. It'll take:

  • The dtype, shape of each input array.
  • The function name to test (both sparse and NumPy/SciPy) or callable.
  • Where to place the arguments.
  • Any additional arguments to the function.

It will:

  • Generate the random arrays.
  • Perform the operation on both arrays.
  • Compare/assert.

This way, tests just reduce to "stub classes" instead of repetitions.

cc: @mrocklin

Contributor guide

Open the contributing guide

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.

Research direction

No files or specific tests are named. Start by reviewing the existing test suite and its repeated sparse versus NumPy/SciPy cases. Done means a reusable test model covers input dtype and shape, callable selection, argument placement, additional arguments, generated arrays, operations, and comparisons.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.