pacificclimate / climpyrical

A Python tool for constraining and manipulating CanRCM4 climate models.
GNU General Public License v3.0
1 stars 0 forks source link

Tests - what to check and what to test? #6

Closed nannau closed 5 years ago

nannau commented 5 years ago

I'm trying to identify the differences between checks and tests. Since I am new to testing, I've added a few checks and tests to the data loading part of climpyrical.

My understanding of tests vs. checks is rudimentary, however, is this in essence:

In this PR I have two places where I implement checks and tests. The checks remain in datacube.py and are at the top of the file.

Please let me know if you have any input on this!

corviday commented 5 years ago

I really, really like pytest. If it fits with the way you have code organized at all, I'd suggest it.

EDIT: I see you are using it, it just wasn't listed in requirements.txt where I checked. Never mind!

rod-glover commented 5 years ago

Yes:

rod-glover commented 5 years ago

Well, @corviday got there ahead of me re. parametrizing, but note he is suggesting parametrizing the path, and not the var. In fact you should parametrize both.