Ancestors

Toot

Written by bitcrush.io on 2024-10-30 at 18:08

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

Descendants

Written by bmaxv on 2024-10-30 at 18:37

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113397707314556431
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
268.947221 milliseconds
Gemini-to-HTML Time
0.667851 milliseconds

This content has been proxied by September (3851b).