NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 63 forks source link

Add more unit tests for routines in common.py #465

Closed mkavulich closed 1 year ago

mkavulich commented 1 year ago

This PR is a demo to begin adding more unit test coverage to the CCPP-framework. Since a unit test was recently added for the test_string_to_python_identifier function in common.py, I added unit tests for the remaining functions in that file.

To run these unit tests, simply navigate to the test/unit_tests directory and run the script (with Python 3.7 or higher):

python test_common.py 
.....
----------------------------------------------------------------------
Ran 5 tests in 0.023s

OK

User interface changes?: No

Fixes: No issue specific to this change. This test focuses on the ccpp_prebuild portion of code, but should be a stepping stone to a number of issues relating to capgen unit tests.

Testing: unit tests: All passed