Test for Exception
def test_sqrt_of_negative(self):
with self.assertRaises
(ValueError):
math.sqrt(-1)
assertRaises
expects a block of code to raise an
exception:
Get your own AI website up and running! Start your new business, personal, or research website with our ready to use website scripts and templates.