コード例 #1
0
 def test_case2_exception(self):
     """test case for sin(string)"""
     calc = ScientificCalc()
     self.assertEqual(calc.sin_func('string'), 'Please enter float or integer types input.')
コード例 #2
0
 def test_case3_negative(self):
     """test case for sin(-30)"""
     calc = ScientificCalc()
     self.assertEqual(calc.sin_func('-30'), 0.9880316240928618)
コード例 #3
0
 def test_case3_float(self):
     """test case for sin(30.8)"""
     calc = ScientificCalc()
     self.assertEqual(calc.sin_func('30.8'), -0.5777150444457317)
コード例 #4
0
 def test_case_positive(self):
     """test case for sin(30)"""
     calc = ScientificCalc()
     self.assertEqual(calc.sin_func('30'), -0.9880316240928618)