This project is focused on practicing various test methods available in Python's unittest
library. It includes tests designed to explore and demonstrate assertion, and skip decorator by applying them in different scenarios.
- To gain hands-on experience with some available
unittest
methods. - To understand when and how to use assertion, and skip decorator effectively.
- To build a foundational understanding of unit testing in Python.
- code/assertion_tests_folder/: Includes all test cases, with each assertion type explored individually.
- code/skip_tests_folder: Include test module to practice unittest.skip decorator.
This project covers the following unittest
assertion methods:
assertEqual()
assertNotEqual()
assertTrue()
assertFalse()
assertIs()
assertIsNot()
assertIsNone()
assertIsNotNone()
assertIn()
assertNotIn()
assertIsInstance()
assertNotIsInstance()
assertAlmostEqual()
assertNotAlmostEqual()
assertGreater()
assertGreaterEqual()
assertLess()
assertLessEqual()
assertRegex()
assertNotRegex()
assertMultiLineEqual()
assertSequenceEqual()
assertListEqual()
assertTupleEqual()
assertSetEqual()
assertDictEqual()
unittest.skipIf(condition, reason)
unittest.skip(reason)
This project is open-source and available for educational purposes.