# 🧪 TestingWithPyTest
This repository demonstrates how to write and run unit tests using [Pytest](https://docs.pytest.org/en/stable/) — a powerful Python testing framework. It’s ideal for beginners learning how to structure and execute tests in Python.
---
## 📂 Project Structure
The repo includes simple test files to help you learn the Pytest workflow:
TestingWithPyTest/ ├── test_one.py ├── test_two.py ├── three_test.py ├── test_four.py ├── test_five.py └── requirements.txt
Each file demonstrates different Pytest features like:
- Basic test functions
- Assertions
- Grouping tests
- Pytest naming conventions
---
## 🔧 Installation
1. Clone the repository:
```bash
git clone https://github.com/suba-learning/TestingWithPyTest.git
cd TestingWithPyTest
-
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
You can run all tests using:
pytestTo run a specific file:
pytest test_one.pyTo run a specific test function:
pytest test_one.py::test_function_nameUse -v for verbose output:
pytest -vHave a suggestion or want to add a new example? Feel free to fork this repo and create a pull request!
This project is open source and available under the MIT License.