samedi 3 août 2019

I'm Testing Python, What Should I Test? [on hold]

I've been reading about testing Python code with Unittest, but am confused how to apply those tests in my code. I'm looking for any suggestions or examples for important/effective tests, but there are two particular situations of question.

Most examples in tutorials just show testing something like an addition function. To me this doesn't seem super relevant since (a) I never make such simple functions and (b) since I would assume that python's addition is correct. Am I wrong in these assumptions? What is a more practical function that I might need to test?

Some of my larger applications are heavy on PyQt/PySide2 for their GUI. Therefore, many of my functions include GUI setup and threaded/worker logic. Are these candidates for testing? If so, how can I write good tests for this kind of function.

Thank you for any clarification! I see the value in adding tests to my code, but am unsure how to start.

Aucun commentaire:

Enregistrer un commentaire