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
Problem
The HTI integration tests intend to assert the expected systematic error, but they store the expected value in sys_err2, overwrite sys_err2 with the function return value, and then assert sys_err2 against itself. This masks regressions in the third return value from integrate_range_hti().
Reproduction
Change integrate_range_hti() to return an obviously wrong sys_err; these assertions can still pass because the expected value has been overwritten.
Expected result
Use distinct variable names, for example sys_err1 for the expected value and sys_err2 for the actual value, then assert them against each other.
Source: Codex global repository scan of deepmodeling/dpti at commit b719828.
Project: DeepModeling Agent Code Scan
Problem
The HTI integration tests intend to assert the expected systematic error, but they store the expected value in
sys_err2, overwritesys_err2with the function return value, and then assertsys_err2against itself. This masks regressions in the third return value fromintegrate_range_hti().Code references
dpti/tests/test_lib_utils.py
Line 75 in b719828
dpti/tests/test_lib_utils.py
Line 80 in b719828
dpti/tests/test_lib_utils.py
Line 83 in b719828
dpti/tests/test_lib_utils.py
Line 88 in b719828
dpti/tests/test_lib_utils.py
Line 93 in b719828
dpti/tests/test_lib_utils.py
Line 96 in b719828
Reproduction
Change
integrate_range_hti()to return an obviously wrongsys_err; these assertions can still pass because the expected value has been overwritten.Expected result
Use distinct variable names, for example
sys_err1for the expected value andsys_err2for the actual value, then assert them against each other.