This repository is focused on learning how to write unit tests in Python using the built-in unittest
framework. It contains simple Python functions along with their corresponding unit tests. The goal is to practice writing effective tests to validate the functionality of the code and ensure it behaves as expected.
One of the functions in this repository is age.py
, which includes a function to calculate if a person is an adult based on their age:
- fun4/: Functions with unit tests related to specific logic.
__init__.py
: Initializes the package.age.py
: Contains functions related to age calculations.age_exceptions.py
: Custom exceptions related to age logic.jak.py
: A function with specific functionality.test_age.py
: Unit tests for age-related functions.test_age_exceptions.py
: Unit tests for age exceptions.test_jak.py
: Unit tests for the jak function.test_suite.py
: A test suite that aggregates multiple tests.
Explore the repository to see examples of unit testing and enhance your understanding of testing principles in Python!