© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Miguel Brito
Machine Learning Software Engineer - Hobbyst Technical Writer - Interested in Software Testing, Best Practices, Scalability, and Python.
TL;DR Time is a precious resource so I won't waste yours. Here's how you can assert an exception is raised and how to check that in pytest. Solution: Use pytest.raises import pytest def test_raises_exception(): with pytest.raises(ZeroDivisionErr...
No responses yet.