Anyone have recommendations for a guide to debugging and unit testing in Python?
All of my code learning in multiple languages has been very ad-hoc, and testing is a weak point that I'd like to work on.
[#]Python #Testing
=> More informations about this toot | More toots from bitcrush_io@oldbytes.space
@bitcrush_io
Did you read the docs for unittest yet?
https://docs.python.org/3/library/unittest.html#basic-example
It's not much more than making sure the functions produce known output for known input and to check that the errors that mean to throw actually get triggered.
(You don't even need unittest's special assert functions.)
=> More informations about this toot | More toots from bmaxv@noc.social This content has been proxied by September (3851b).Proxy Information
text/gemini