Split up tests?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
Currently a large share of our tests are in test_dataset.py and test_dataarray.py — each of which are around 7k lines.
There's a case for splitting these up:
- Many of the tests are somewhat duplicated between the files (and
test_variable.pyin some cases) — i.e. we're running the same test over a Dataset & DataArray, but putting them far away from each other in separate files. Should we instead have them split by "function"; e.g.test_rolling.pyfor all rolling tests? - My editor takes 5-20 seconds to run the linter and save the file. This is a very narrow complaint.
- Now that we're all onto pytest, there's no need to have them in the same class.
If we do this, we could start on the margin — new tests around some specific functionality — e.g. join / rolling / reindex / stack (just a few from browsing through) — could go into a new respective test_{}.py file. Rather than some big copy and paste commit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing test_dataset.py, test_dataarray.py, and test_variable.py, focusing on duplicated tests for join, rolling, reindex, or stack. A possible first step is placing new tests for one functionality in a respective test_{}.py file; completion would mean the tests are organized without a broad copy-and-paste migration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100