lundi 5 septembre 2016

assert vs == for testing code in Python?

What is the need for importing unittest and running assertTrue (for example) while testing a python function instead of writing a usual python function with == True check for testing? What is the new thing about unittesting, as even the test cases have to be written by user, which can be checked by == instead of assert family of functions in unittest?

Aucun commentaire:

Enregistrer un commentaire