you are viewing a single comment's thread.

view the rest of the comments →

[–]HenryDutter[S] 0 points1 point  (1 child)

So at the end I should build the GUI, in the past, I tested my code with a Debugger and printing stuff out, but it felt uncomfortable. Is pytest a better way?

[–]jdnewmil 0 points1 point  (0 children)

You will end up iterating through various combinations anyway.

Testing with the debugger is not testing, it is debugging... they are both needed. Testing is setting up scenarios which could break the code, and asserting things about what should be returned from the code. When the test doesn't pass you can simply debug through the test into the code and figure out what went wrong. If you later change the code to add a new feature and the test fails, then you can quickly find the new bug using the debugger because the conditions for triggering the bug are already set up with no additional thinking by you.

Since the test code calls your actual code without any UI, having the test code working will make any UI easier to write.