I'm trying to understand how people know how and what to test for their project? I am relatively new to programming and have used AI to write my unit tests before. I've found writing tests by hand to be very tedious and error prone. I am wondering if this is an acceptable use case for AI and if anyone else has experience with this. Thank you ! ๐ ๐ฑ
Are tests usually just:
def func_to_test(val): ...
class Test(unittest.TestCase):
def test_func(self):
self.assertEqual(func_to_test(val), CorrectValue)