Pages

Showing posts with label Test Driven Developement. Show all posts
Showing posts with label Test Driven Developement. Show all posts

Monday, 24 April 2023

Hooks in Pytest

Hooks are a powerful feature in the pytest testing framework that allow you to customize and extend the behavior of pytest during test execution. They are functions that are automatically called by pytest at various points during the test lifecycle, and you can define your own hooks in pytest plugins or conftest.py files to modify or extend the default behavior of pytest.

Saturday, 15 April 2023

pytest in python by example

Pytest is a popular testing framework in Python that makes it easy to write and run tests for your code.

Friday, 14 April 2023

Mock, patch, and MagicMock in python

Mock, patch, and MagicMock are three powerful tools provided by the Python unittest.mock module for testing and mocking purposes. These tools allow developers to replace parts of a system under test with mock objects that can simulate the behavior of the original objects.

Monday, 10 April 2023

Test-driven development (TDD) in Python

Test-driven development (TDD) is a software development approach where tests are written before any code is implemented. The idea is to write tests that cover all possible use cases for a particular feature or functionality, and then implement the code to satisfy those tests. TDD is an iterative and incremental process, where the code is continuously refactored to improve its design and maintainability.