Update test_module.py (#3)

Changed rectangle for square where it was wrong
This commit is contained in:
Nacho 2021-02-04 02:18:27 +01:00 committed by GitHub
parent 7071e7231a
commit 23c6841fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ class UnitTests(unittest.TestCase):
self.assertEqual(actual, expected, 'Expected area of rectangle to be 18')
actual = self.sq.get_area()
expected = 25
self.assertEqual(actual, expected, 'Expected area of rectangle to be 25')
self.assertEqual(actual, expected, 'Expected area of square to be 25')
def test_perimeter(self):
@ -47,7 +47,7 @@ class UnitTests(unittest.TestCase):
self.assertEqual(actual, expected, 'Expected perimeter of rectangle to be 18')
actual = self.sq.get_perimeter()
expected = 20
self.assertEqual(actual, expected, 'Expected perimeter of rectangle to be 20')
self.assertEqual(actual, expected, 'Expected perimeter of square to be 20')
def test_diagonal(self):
actual = self.rect.get_diagonal()
@ -55,7 +55,7 @@ class UnitTests(unittest.TestCase):
self.assertEqual(actual, expected, 'Expected diagonal of rectangle to be 6.708203932499369')
actual = self.sq.get_diagonal()
expected = 7.0710678118654755
self.assertEqual(actual, expected, 'Expected diagonal of rectangle to be 7.0710678118654755')
self.assertEqual(actual, expected, 'Expected diagonal of square to be 7.0710678118654755')
def test_set_atributes(self):
self.rect.set_width(7)