-
Notifications
You must be signed in to change notification settings - Fork 7
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
increase code coverage, especially unit tests #57
Comments
#56 references this issue. |
One quick way to increase coverage would be to omit from coverage report the stuff we don't plan on covering anyway. I am thinking of the GUI, or synapses/minis.py. |
@AurelienJaquier, can we instead add unit tests for the Tkinter GUI at least for its main functions like clicking the start button to run the simulation? GUI module depends on many modules like morphologies, recordings, synapses but the changes made in those modules are not testing if the GUI functions are still compatible. It seems there are event methods to interact with UI elements, e.g. do a click, enter some value This is a test file for Tkinter: |
The GUI module also has simulation functions that need to stay compatible with the rest of the modules. I think it would be good to keep them updated with the future changes. https://github.com/BlueBrain/EModelRunner/blob/main/emodelrunner/GUI_utils/simulator.py#L177 |
Thank you for the links, this will help. I'll add some tests for the GUI module then. |
* add unit tests for json utilities * replace try-except-pass with contextlib.suppress * add unit test to cover runtimerror raised in creating protocols * add test_np_encoder_float for NpEncoder * separate create_protocol and reader unit tests
#59 adds unit tests for GUI/simulator |
I am afraid we won't be able to test the frames, buttons, and other tkinter stuff. For that, we need a graphical environment, and it looks like we don't have one in github actions (source: https://github.com/python/cpython/blob/main/Lib/idlelib/idle_test/README.txt#L47). |
Yeah, not sure if we need to test that. If you really want to, I think @alex4200 has something running on our systems to test GUIs? |
Ok, covering GUI module's simulation related code was the critical part. |
The coverage is currently (%69) not so high.
More users will try EModelRunner now since the Synplas paper is released.
Increasing the coverage will allow us detect issues before them.
Most tests are functional, we need more unit tests.
The text was updated successfully, but these errors were encountered: