livMatS / dtool-lookup-gui

Graphical user interface for dtool
Other
8 stars 2 forks source link

Tests, tests, tests #60

Open pastewka opened 2 years ago

pastewka commented 2 years ago

This code is lacking tests entirely. We need to fix this.

jotelha commented 2 years ago

Why invalid? Didn't we want to do something like this, https://blogs.gnome.org/johan/2013/03/27/unittesting-gtk-applications/?

pastewka commented 2 years ago

Yes.

jotelha commented 2 years ago

I would start collecting a few random resources that may or may not be useful for writing tests,

jotelha commented 1 year ago

I think a simple approach is to package as much behavior of the app as possible into atomic "Actions" like https://github.com/livMatS/dtool-lookup-gui/blob/4e03bac929545153d325428b72b69585e5fe675b/dtool_lookup_gui/views/main_window.py#L519-L522 and write simple unit tests against each of those actions.

jotelha commented 1 year ago

Have added a snippet on actions in the contributing guidelines on https://dtool-lookup-gui--282.org.readthedocs.build/en/282/contributing.html#gio-action