---
title: "Discussion on \"Why do we need unit test? And how to write it in Python?\" | Hashnode"
description: "Discussion on \"Why do we need unit test? And how to write it in Python?\". A good program must be correct. Try to imagine getting negative salary because of a bug. To verify how the program work, you must test it. But testing by hand is slow and unreliable. By the time you are testing a program, your competitor might alread..."
url: "https://hashnode.com/posts/why-do-we-need-unit-test-and-how-to-write-it-in-python/61d456bb220e987977669000"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why do we need unit test? And how to write it in Python?](https://blog.pontakorn.dev/why-do-we-need-unit-test-and-how-to-write-it-in-python?utm_source=hashnode&utm_medium=feed)

A good program must be correct. Try to imagine getting negative salary because of a bug. To verify how the program work, you must test it. But testing by hand is slow and unreliable. By the time you are testing a program, your competitor might alread...

Jan 4, 2022 · 3 min read · blog.pontakorn.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)
-   [#testing](https://hashnode.com/tag/testing)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)

## Written by

[Pontakorn Paesaeng](https://hashnode.com/@pontakorn)

@pontakorn

  
[View profile](https://hashnode.com/@pontakorn)

Frontend devs that want to explore more about dev.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
