You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unit-test string replacement in LREPRSTRUCT test #3325
Extract the line, user_nl_clm_text = re.sub(r"GRAIN\w*", replace_grain, user_nl_clm_text) into a new top-level function in the module. This will be the function that would be unit tested.
Do a manual test of building the LREPRSTRUCT test to ensure that the user_nl_clm file is still the same as before after steps (1) and (2).
Create a unit test module for LREPRSTRUCT
Create at least one unit test for the extracted function, giving it a string as input and testing the resulting string. At a minimum this should have the situation mentioned in my comment above, where one line contains 'GRAINN_TO_FOOD' and a later line contains (among other things) "'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN'". (The later line could include a more extensive line that matches what's in that line in the current user_nl_clm.)
Activity
ekluzek commentedon Aug 26, 2026
This is a good thing to do, but isn't required on a CTSM6.0.0 timeframe.