SECTION 43 / 48
Testing Expected Exceptions
Add 10 items and attempt to delete 20. A test using pytest.raises(ValueError) passes when ValueError is raised. If the test deletes only 5, the expected exception is not raised and that test fails.
Add 10 items and attempt to delete 20. A test using pytest.raises(ValueError) passes when ValueError is raised. If the test deletes only 5, the expected exception is not raised and that test fails.