forked from mdekauwe/CABLE_benchmarking
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organise unit tests to use pytest fixtures
Unit tests have an excessive amount of repeated test setup code, making unit tests harder to maintain and read. Using pytest fixtures to setup each test would remove needless code repetition and also prevents the possibility of state leaking into each test case. Organise the tests so that for each function `func`, we have a test class `TestFunc` with each method of `TestFunc` containing a single test (success or failure case). Use pytest's `parametrize()` feature for testing different levels of verbosity. Remove usage of `mock_cwd` fixture unless it is required for a test to pass. Fixes #163
- Loading branch information
1 parent
fdcab39
commit 107cc86
Showing
11 changed files
with
1,630 additions
and
1,437 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.