kenken999's picture
teste
b1ce64c
raw
history blame
470 Bytes
from unittest import TestCase
from src.shapes import Circle, Rectangle
class TestShapes(TestCase):
"""Test shapes"""
def test_circle_area(self):
"""Test circle area calculation"""
circle = Circle(radius=5)
self.assertAlmostEqual(circle.area(), 78.5, places=1)
def test_rectangle_area(self):
"""Test rectangle area calculation"""
rectangle = Rectangle(width=4, height=5)
self.assertEqual(rectangle.area(), 20)