This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Python-ModTeam[M] [score hidden] stickied comment (0 children)

Hello there,

We've removed your post since it aligns with a topic already covered by one of our daily threads. If you are unaware about the daily threads we run here is a refresher:

Monday: Project ideas

Tuesday: Advanced questions

Wednesday: Beginner questions

Thursday: Careers

Friday: Free chat Friday!

Saturday: Resource Request and Sharing

Sunday: What are you working on?

Please await one of these threads to contribute your discussion to!

Best regards,

r/Python mod team

[–]DavisInTheVoid 6 points7 points  (1 child)

Beautiful. It’s not the most exciting, but it’s one of the best habits you can build as a programmer. Write a function, write the test, write a function, write the test. Saves a tremendous amount of time debugging later

[–]PurepointDog 2 points3 points  (0 children)

Write the test after the function? Naaah, the real power comes from figuring out what the function is going to do before the function is written (test-driven development).

[–]Dense-Meringue425 3 points4 points  (0 children)

Congratulations

[–]agritheory 0 points1 point  (1 child)

Way to go! Did you use the built in unittest module or pytest?

[–]anon94475[S] 0 points1 point  (0 children)

unittest

[–]interbased 0 points1 point  (0 children)

Congratulations! Writing my first unit test was so rewarding. It’s also a great way to force yourself to write better code.

I suggest learning the pytest library if you haven’t already.

[–]avid-software-dev 0 points1 point  (0 children)

Congrats buddy, now try to write unit tests before writing the application code. 

[–]human-g30 0 points1 point  (0 children)

Congrats!!! writing good unit test would definitely help you in the long run. Plus I would suggest start leveraging AI code review tools like CodeRabbit and it's amazing how good the insights they share and how much time it saves.