So I have this function which returns sine and cosine and another basic unittest function which is supposed to test both return values with assertEqual, but I don't know how to test both of the return values. What's the best way to do that?
def calc_sin_cos(sindeg, cosdeg):
sine = math.sin(math.radians(sindeg))
cosine = math.cos(math.radians(cosdeg))
return sine, cosine
def test_calc_sin_cos(self):
sine = 2
cosine = 2
result = myscript.calc_sin_cos(sine, cosine)
self.assertEqual(result, 0.03489949670250097, 0.9993908270190958)
Obviously the above assertEqual doesn't work properly as it is.