Question: For instance, let s say we are creating a class called Point to store a 2 - D point. We might create the following skeleton
For instance, lets say we are creating a class called Point to store a D point. We might create the following
skeleton code and unittest for our first TDD loop:
Point.py
class Point:
def initself x y:
Initializes a D point with x and y coordinates"""
pass
TestPoint.py
import unittest
from Point import Point # import class Point from file Point.py
class TestPointunittestTestCase:
def setUpself:
Create some points for future tests"""
self.p Point
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
