What is unittest in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

What is unittest in python?

7th Apr 2019, 4:51 AM
NIKITA PATEL
NIKITA PATEL - avatar
2 Answers
+ 5
Unit Testing in Python – Unittest. Unit Testing is the first level of software testing where the smallest testable parts of a software are tested. This is used to validate that each unit of the software performs as designed. The unittest test framework is python's xUnit style framework.
7th Apr 2019, 5:23 AM
eMBee
eMBee - avatar
+ 3
Unit Testing is the first level of software testing where the smallest testable parts of a software are tested. To use unittest: ``` import unittest class Test(unittest.TestCase): def test(self): self.assertTrue(True) if __name__ == '__main__': unittest.main() ``` For a better understanding refer https://www.geeksforgeeks.org/unit-testing-JUMP_LINK__&&__python__&&__JUMP_LINK-unittest/ and try out their exercises.
7th Apr 2019, 5:01 AM
BlackSmithOP
BlackSmithOP - avatar