-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility tests between python and C implementations #41
Comments
To repeat what I said:
That said, I am not sure if it is worth it. It is more into the realm of integration or end to end testing, which have a much lower ROI than unit tests. Since this project is already running late I wonder if it is very wise to do it... |
I think it is still better to use python generated data instead of assembling all test data by hand. |
Though, this sounds like much work. |
Maybe for those tests it is worth it: https://github.com/cvra/can-bootloader/blob/master/tests/integration_tests.cpp For other tests I still feel like writing tests in CPP is better, because they are generally simpler and do not contain too much data. This one for example: https://github.com/cvra/can-bootloader/blob/master/tests/datagrams_command_tests.cpp |
Sure. I don't mean to replace the existing tests, just add at least some tests for python and C interoperability to avoid problems like 97670a4, where the C tests couldn't detect the type problem. |
So my preferred approach would be to use ctypes (https://docs.python.org/3.4/library/ctypes.html) and generate a shared library, which would then be called by the python tests. What do you think ? |
@antoinealb ctypes is pretty simple to use. we use it in our beacons library for example, as long as the wrapped api isn't too big or complicated this is probably the best way to go. i could lend a hand if needed (= |
ok, sounds interesting. |
I can do it. |
Although I have to admit I would prefer to move on to further steps in the planning... This is already lagging behind the schedule. |
Sure, now it's not too important anymore, since we already have hardware to test with. Though for future projects we should do it this way from the beginning. |
We should also test the implementations with each other by additional unit tests.
The text was updated successfully, but these errors were encountered: