pyCGM
pyCGM copied to clipboard
Some pyCGM.py unit tests still mock frame and vsk dictionaries
Many functions in pyCGM_Single/pyCGM.py used to take in:
frame: a dictionary of marker names to positions
{
"RTIB": np.array([433.97537231, 211.93408203, 273.3008728]),
"LTIB": np.array([50.04016495, 235.90718079, 364.32226562]),
"RANK": np.array([422.77005005, 217.74053955, 92.86152649]),
"LANK": np.array([58.57380676, 208.54806519, 86.16953278]),
...
},
and vsk: a dictionary of subject measurement names to values
{
"RightAnkleWidth": 70.0,
"LeftAnkleWidth": 70.0,
"RightTibialTorsion": 0.0,
"LeftTibialTorsion": 0.0,
...
}
Some tests such as test_calc_axis_ankle still take in frame and vsk, but pull out the values:
https://github.com/cadop/pyCGM/blob/78e10bb50a20517e7744e41e99bfad07a8a131d6/pyCGM_Single/tests/test_pycgm_axis.py#L1880
before passing them directly to their respective functions:
https://github.com/cadop/pyCGM/blob/78e10bb50a20517e7744e41e99bfad07a8a131d6/pyCGM_Single/tests/test_pycgm_axis.py#L1896
While this is still a proper test, it would be more straightforward to properly parametrize the values instead of continuing to use the dictionaries.