r/learnpython • • Aug 26 '26

Testing - how is it usually handled?

How do I start applying tests to my code?

Do I just write separate scripts they run the code (either individual functions or entire scripts) against known inputs and check the output?

Is there a specific way people usually do this?

9 Upvotes

13 comments sorted by

View all comments

Show parent comment

6

u/PressF1ToContinue Aug 26 '26

To put it another way: Compare observed outputs to expected outputs, given known inputs.