Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #303 +/- ##
===========================================
+ Coverage 76.48% 83.64% +7.15%
===========================================
Files 22 23 +1
Lines 5576 6274 +698
===========================================
+ Hits 4265 5248 +983
+ Misses 1311 1026 -285
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
|
Is the goal of this fully replace pytest, or to have at least a set of tests for every API functions? |
|
Yes, the goal is to replace them for the main C interface. We can run more complete checks with specific compiler flags, while the other api tests should test only that, api specific stuff, including memory allocation/deallocation to the language native objects. |
|
If so, it will not be a small work. |
|
Well, no. These are all functional (regression tests), so the only missing part is getting input data and compared data which are already present in the python database. That is not so difficult, I just need to actually sit down and do it. However, these are not appropriate tests to rely on for the long-run, since it is hard to pin down where things are breaking and they are vulnerable to numerical fluctuations. The difficult work is to do proper unit (+ integration) testing, which requires going into each component and writing minimal tests. The framework for that is already in place it's just time and work needed to go through each one. I am not tackling this issue for now, but if I have some time to do #301 (#262) that will be unit tested as it evolves. |
This is an example of using googletest test parameterized test fixture. With this it should be easier to get the test data from the test files that are used in python.
See
/test/functional/test_dataset_access.cppfor example usage.TODO:
spg_get_datasetspg_get_layer_datasetspgat_get_datasetspg_get_dataset_with_hall_numberspgat_get_dataset_with_hall_numberfrom_filespg_get_magnetic_datasetspgms_get_magnetic_datasetfrom_file?