This issue is for improved tests and mostly about higher code coverage and better performance.Update
As expected it took a while but it was quite worth it. It turned out to be not so much about adding tests but more about refactoring code to be easier to test.
- Uncovered code reduced from 530 to 189 statements which raised "real" coverage from about 94% to 98%
- Faster test: from 250 to 205 seconds on my local machine.
|2022-12-25||0||374||374||250||w/o pragma, 9,881 statements, 96.21% coverage|
|2022-12-28||79||200||279||250||Pragma for API functions|
|2023-01-05||144||91||235||253||(Re)adding coverage ignores|
|2023-01-09||147||64||211||254||API display image|
|2023-01-11||138||64||202||254||API: display image, subunits|
|2023-01-17||142||66||208||254||With radiocarbon dating|
|2023-01-21||174||0||174||260||Clean up tests|
|2023-01-22||174||0||174||255||Clean up tests|
|2023-01-23||174||0||174||250||Clean up tests|
|2023-01-24||174||0||174||240||Clean up tests|
|2023-01-26||179||0||179||225||Clean up tests|
|2023-01-27||189||0||189||215||Clean up tests, after adding ARCHE import|
|2023-01-28||189||0||189||205||Clean up tests|
Updated by Alexander Watzinger 9 months ago
- Description updated (diff)
As expected it took a while but coverage is now back at 100% (in the develop branch) with 174 statements ignored with the "pragma: no cover" comment.
So "real" coverage raised from 94% to 98%. As it turned out it was not so much about adding tests but more about refactoring to make code easier to test.
Next part of this issue will be cleaning up tests and try to make them faster. Although they only take a few minutes (265 seconds on my local machine) which is not bad for the complex code and high coverage, faster is always better because it means they will be run more often and less time is wasted waiting for results.