URL details: seanh.github.io/2017/01/29/testing-that-exceptions-are-raised/

URL title: Testing that an Exception is Raised with pytest.raises | seanh.cc
URL description: Previously we tested that the validate_url() function returns the given URL if it’s a valid URL. If the given URL is not valid then validate_url() is supposed to raise a ValueError exception. To test this we need to use pytest.raises(). Here is a test that expects validate_url() to raise a ValueError:
URL last crawled: 2023-01-10
URL speed: 0.602 MB/s, downloaded in 0.030 seconds

open external url

We found no external links pointing to this url.