Skip to content

Commit

Permalink
Update test_third_angle_of_triangle.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 24, 2024
1 parent 3f63da4 commit f1d31ca
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions kyu_8/third_angle_of_triangle/test_third_angle_of_triangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import unittest
import allure
from parameterized import parameterized
from utils.log_func import print_log
from kyu_8.third_angle_of_triangle.third_angle_of_triangle \
import other_angle
Expand All @@ -29,7 +30,12 @@
class OtherAngleTestCase(unittest.TestCase):
"""Testing other_angle function."""

def test_other_angle(self):
@parameterized.expand([
(30, 60, 90),
(60, 60, 60),
(43, 78, 59),
(10, 20, 150)])
def test_other_angle(self, a, b, expected):
"""
Testing other_angle function with various test data.
Expand All @@ -47,29 +53,5 @@ def test_other_angle(self):
"Find the 3rd.</p>")
# pylint: enable-msg=R0801
with allure.step("Enter values of two angles and return the 3rd"):
a: int = 30
b: int = 60
expected: int = 90
print_log(a=a, b=b, expected=expected)
self.assertEqual(other_angle(a, b), expected)

with allure.step("Enter values of two angles and return the 3rd"):
a = 60
b = 60
expected = 60
print_log(a=a, b=b, expected=expected)
self.assertEqual(other_angle(a, b), expected)

with allure.step("Enter values of two angles and return the 3rd"):
a = 43
b = 78
expected = 59
print_log(a=a, b=b, expected=expected)
self.assertEqual(other_angle(a, b), expected)

with allure.step("Enter values of two angles and return the 3rd"):
a = 10
b = 20
expected = 150
print_log(a=a, b=b, expected=expected)
self.assertEqual(other_angle(a, b), expected)

0 comments on commit f1d31ca

Please sign in to comment.