forked from mdekauwe/CABLE_benchmarking
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve unit testing #99
Merged
Merged
Commits on Jun 27, 2023
-
Currently, benchcab does not have extensive coverage in its unit tests. Parts of the code that have poor test coverage are dependent on system interaction (e.g. environment modules, running subprocess commands (SVN, build scripts, executables, PBS). This change refactors and adds unit testing for these parts of the code base. Move the code from the benchcab.run_cable_site module to the benchcab.task module. This is done so that we reduce coupling between modules that use fluxnet tasks. This also has the benefit that we can test the two modules easily by sharing the same test setup functions. We move the code from the benchcab.run_comparison module to benchcab.task module for the same reasons. Unit tests now check exception messages and standard output produced by benchcab for both non-verbose and verbose modes. **Beware:** standard output messages have been updated in some areas. These changes will need to be updated in the documentation. Refactor the default build so that environment modules are loaded via python instead of writing module load statements into the temporary build script. This is done to reduce the complexity of the unit tests. The stderr output from subprocess commands are now redirected to stdout so that stderr is suppressed in non-verbose mode. Fixes #58 #22 #86
Configuration menu - View commit details
-
Copy full SHA for e2813ac - Browse repository at this point
Copy the full SHA e2813acView commit details
Commits on Jul 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 865da7a - Browse repository at this point
Copy the full SHA 865da7aView commit details
Commits on Jul 12, 2023
-
This change refactors the code to be more object oriented so that we can better support mocking via dependency injection rather than resorting to the `unittest.mock.patch` function. This allows us to write unit tests that are simpler and that preserve the API layer (as opposed to using `unittest.mock.patch` which breaks the API layer). Fixes #102
Configuration menu - View commit details
-
Copy full SHA for ecc7940 - Browse repository at this point
Copy the full SHA ecc7940View commit details
Commits on Jul 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 06c2c61 - Browse repository at this point
Copy the full SHA 06c2c61View commit details
Commits on Jul 14, 2023
-
Add requested changes from code review
Co-authored-by: Claire Carouge <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 95f1871 - Browse repository at this point
Copy the full SHA 95f1871View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8acd685 - Browse repository at this point
Copy the full SHA 8acd685View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.