Exceptions3:27 with Kenneth Love
If your code raises exceptions it's a good idea to test them to make sure they get raised properly. Luckily `unittest` provides a mechanism for this.
assertRaises(x) - Make sure the following code raises the
You can use
@unittest.expectedFailure on tests that you know will fail
with assertRaises(ValueError): int('a')
You need to sign up for Treehouse in order to download course files.Sign up