Update test_module.py (#3)
Changed rectangle for square where it was wrong
This commit is contained in:
parent
7071e7231a
commit
23c6841fda
@ -38,7 +38,7 @@ class UnitTests(unittest.TestCase):
|
|||||||
self.assertEqual(actual, expected, 'Expected area of rectangle to be 18')
|
self.assertEqual(actual, expected, 'Expected area of rectangle to be 18')
|
||||||
actual = self.sq.get_area()
|
actual = self.sq.get_area()
|
||||||
expected = 25
|
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):
|
def test_perimeter(self):
|
||||||
@ -47,7 +47,7 @@ class UnitTests(unittest.TestCase):
|
|||||||
self.assertEqual(actual, expected, 'Expected perimeter of rectangle to be 18')
|
self.assertEqual(actual, expected, 'Expected perimeter of rectangle to be 18')
|
||||||
actual = self.sq.get_perimeter()
|
actual = self.sq.get_perimeter()
|
||||||
expected = 20
|
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):
|
def test_diagonal(self):
|
||||||
actual = self.rect.get_diagonal()
|
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')
|
self.assertEqual(actual, expected, 'Expected diagonal of rectangle to be 6.708203932499369')
|
||||||
actual = self.sq.get_diagonal()
|
actual = self.sq.get_diagonal()
|
||||||
expected = 7.0710678118654755
|
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):
|
def test_set_atributes(self):
|
||||||
self.rect.set_width(7)
|
self.rect.set_width(7)
|
||||||
|
Loading…
Reference in New Issue
Block a user