Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_return_type_coercion(self):
assert coerce_to_int_and_return(1.0, 2.0) == 3
with self.assertRaises(ReturnTypeError):
coerce_to_int_and_return("one", "two")
def test_return_type(self):
assert returns_int(1, 2) == 3
with self.assertRaises(ReturnTypeError):
returns_int(1.0, 2.0)