Pytest Day-1 PDF
Pytest Day-1 PDF
Topics
Day-1 : Module & OOPS Concepts
Meganadha Reddy K
Sr. Manager, L&D, Cigniti
Module
• A module is file consisting of Python Code
Maths.py
Object Oriented Programming - Introduction
__init__(self)
__init__(self, <<parameters>>)
Constructor in Python (2 of 2)
Destructor in Python (1 of 2)
• Destructor is used to free up the memory if the object is no longer in use.
• This is termed as Garbage Collection
__del__(self)
Destructor in Python (2 of 2)
isinstance(obj, class_name)
Statements – In Class [YES Allowed]
• In PYTHON, we can write statements directly inside class.
• This is not allowed in Java or C# languages
Inheritance and Types
A A A B
B
B C
Single Inheritance
C Multiple Inheritance